/*=========================================================================
* IPT_Kwan.c :
*     KeyWord Analyse
*
* (c) Ubi Studios 1997
*=======================================================================*/
 
#include "IPT_CPA.h"
 
#include "IPT_Hdl.h"
 
#define D_IPT_Input_StructureDefine
#include "IPT_KDef.h"
#include "IPT_Str.h"
#undef D_IPT_Input_StructureDefine
 
#include "ErrIPT.h"
 
#include "IPT_Hist.h"
#include "IPT_Def.h"
#include "IPT_KDef.h"
#include "IPT_Anal.h"
 
#define D_IPT_DefineIsKeyWordValid
    #include "IPT_Kwan.h"
#undef D_IPT_DefineIsKeyWordValid
 
/* ANNECY AV DEMO {*/
#ifndef U64
    extern int IPT_g_bAtLeastOneActionIsValidated;
#endif
/* END ANNECY AV }*/
 

IPT_tdxHandleToEntryElement g_h_ActualEntryInput;
IPT_tdxHandleToKeyWordElement IPT_g_hNextParameter;
unsigned long IPT_g_ulSequenceAnalyseNumber;
 
/*************************************************************************/
 
 
/*************************************************************************/
/**** Keyword functions                                               ****/
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_And(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
	IPT_g_hNextParameter = _hKeyWordElement+1;
	ucReturn = ( (IPT_fn_bIsKeyWordValid(IPT_g_hNextParameter)==IPT_C_TRUE)
             &(IPT_fn_bIsKeyWordValid(IPT_g_hNextParameter)==IPT_C_TRUE))
            ?IPT_C_TRUE:IPT_C_FALSE;
 
 return(ucReturn);
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_Or(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
	IPT_g_hNextParameter = _hKeyWordElement+1;
	ucReturn = ( (IPT_fn_bIsKeyWordValid(IPT_g_hNextParameter)==IPT_C_TRUE)
             |(IPT_fn_bIsKeyWordValid(IPT_g_hNextParameter)==IPT_C_TRUE))
            ?IPT_C_TRUE:IPT_C_FALSE;
 
 return(ucReturn);
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_Not(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 
/*IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 ucReturn = IPT_fn_bIsKeyWordValid(IPT_g_hNextParameter)==IPT_C_TRUE ? IPT_C_FALSE : IPT_C_TRUE;
 
 return(ucReturn);
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_KeyJustPressed(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
#if (!defined(U64))
 unsigned char ucReturn = IPT_C_FALSE;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 ucReturn = (fn_wKbJustDown(IPT_g_hNextParameter->u_ElementUnion.swKey)==C_wKbTrue)?IPT_C_TRUE:IPT_C_FALSE;
 /*IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
 IPT_g_hNextParameter ++;
 
/* ANNECY AV DEMO {*/
 IPT_g_bAtLeastOneActionIsValidated |= ucReturn;
/* END ANNECY AV }*/
 
 return(ucReturn);
#else
 return(IPT_C_FALSE);
#endif /* !U64 */
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_KeyJustReleased(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
#if (!defined(U64))
 unsigned char ucReturn = IPT_C_FALSE;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
	IPT_g_hNextParameter = _hKeyWordElement+1;
	ucReturn = (fn_wKbJustUp(IPT_g_hNextParameter->u_ElementUnion.swKey)==C_wKbTrue)?IPT_C_TRUE:IPT_C_FALSE;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
	IPT_g_hNextParameter ++;
 return(ucReturn);
#else
 return(IPT_C_FALSE);
#endif /* !U64 */
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_KeyPressed(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
#if (!defined(U64))
 unsigned char ucReturn = IPT_C_FALSE;
/* ANNECY AV {*/
 unsigned char ucValue;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 ucReturn = (  fn_wKbIsDown(IPT_g_hNextParameter->u_ElementUnion.swKey)==C_wKbTrue
             &&((ucValue = IPT_g_hInputStructure.p_ucKeyboardCounter[IPT_g_hNextParameter->u_ElementUnion.swKey]) >= IPT_g_hNextParameter->ucMinCounterInput)
             &&( ucValue                                                                                          <= IPT_g_hNextParameter->ucMaxCounterInput)
/* END ANNECY AV }*/
	        )?IPT_C_TRUE:IPT_C_FALSE;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
 IPT_g_hNextParameter ++;
 
/* ANNECY AV DEMO {*/
 IPT_g_bAtLeastOneActionIsValidated |= ucReturn;
/* END ANNECY AV }*/
 
 return(ucReturn);
#else
 return(IPT_C_FALSE);
#endif /* !U64 */
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_KeyReleased(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
#if (!defined(U64))
 unsigned char ucReturn = IPT_C_FALSE;
/* ANNECY AV {*/
 unsigned char ucValue;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
	IPT_g_hNextParameter = _hKeyWordElement+1;
	ucReturn = (  fn_wKbIsDown(IPT_g_hNextParameter->u_ElementUnion.swKey)==C_wKbFalse
             &&((ucValue = IPT_g_hInputStructure.p_ucKeyboardCounter[IPT_g_hNextParameter->u_ElementUnion.swKey]) >= IPT_g_hNextParameter->ucMinCounterInput)
             &&( ucValue                                                                                          <= IPT_g_hNextParameter->ucMaxCounterInput)
/* END ANNECY AV }*/
	        )?IPT_C_TRUE:IPT_C_FALSE;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
	IPT_g_hNextParameter ++;
 
 return(ucReturn);
#else
 return(IPT_C_FALSE);
#endif /* !U64 */
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_PadJustPressed(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 unsigned long ulPadNumber;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 ulPadNumber = IPT_g_hNextParameter->u_ElementUnion.swPadNumber;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
 IPT_g_hNextParameter ++;
 if (IPT_g_hInputStructure.p_ucValideAndActiveDevice[IPT_E_Pad00DeviceEvent+ulPadNumber]==IPT_C_ActivatePadDevice)
 {
  switch (IPT_g_hNextParameter->u_ElementUnion.swPadAction)
  {
   case IPT_E_PadUp:
    ucReturn = (INO_fn_wJoystickJustUp((short)ulPadNumber)==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadDown:
    ucReturn = (INO_fn_wJoystickJustDown((short)ulPadNumber)==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadLeft:
    ucReturn = (INO_fn_wJoystickJustLeft((short)ulPadNumber)==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadRight:
    ucReturn = (INO_fn_wJoystickJustRight((short)ulPadNumber)==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
    break;
   default: /* Button ?*/
    if (IPT_g_hNextParameter->u_ElementUnion.swPadAction>=IPT_E_PadFirstButton&&IPT_g_hNextParameter->u_ElementUnion.swPadAction<=IPT_E_PadLastButton)
     ucReturn = (INO_fn_wJoystickButtonJustPressed((short)ulPadNumber,IPT_g_ulPadAndJoyButtonFlag[IPT_g_hNextParameter->u_ElementUnion.swPadAction-IPT_E_PadFirstButton])==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
  }
 }
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement)));*/
	IPT_g_hNextParameter ++;
 
/* ANNECY AV DEMO {*/
#ifndef U64
 IPT_g_bAtLeastOneActionIsValidated |= ucReturn;
#endif
/* END ANNECY AV }*/
 
 return(ucReturn);
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_PadJustReleased(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 unsigned long ulPadNumber;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 ulPadNumber = IPT_g_hNextParameter->u_ElementUnion.swPadNumber;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
 IPT_g_hNextParameter ++;
 if (IPT_g_hInputStructure.p_ucValideAndActiveDevice[IPT_E_Pad00DeviceEvent+ulPadNumber]==IPT_C_ActivatePadDevice)
 {
  switch (IPT_g_hNextParameter->u_ElementUnion.swPadAction)
  {
   case IPT_E_PadUp:
    ucReturn = (INO_fn_wJoystickDirectionJustReleased((short)ulPadNumber,C_ulJoyUp)==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadDown:
    ucReturn = (INO_fn_wJoystickDirectionJustReleased((short)ulPadNumber,C_ulJoyDown)==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadLeft:
    ucReturn = (INO_fn_wJoystickDirectionJustReleased((short)ulPadNumber,C_ulJoyLeft)==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadRight:
    ucReturn = (INO_fn_wJoystickDirectionJustReleased((short)ulPadNumber,C_ulJoyRight)==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
    break;
   default: /* Button ?*/
    if (IPT_g_hNextParameter->u_ElementUnion.swPadAction>=IPT_E_PadFirstButton&&IPT_g_hNextParameter->u_ElementUnion.swPadAction<=IPT_E_PadLastButton)
     ucReturn = (INO_fn_wJoystickButtonJustReleased((short)ulPadNumber,IPT_g_ulPadAndJoyButtonFlag[IPT_g_hNextParameter->u_ElementUnion.swPadAction-IPT_E_PadFirstButton])==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
  }
 }
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement)));*/
	IPT_g_hNextParameter ++;
 return(ucReturn);
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_PadPressed(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 unsigned long ulPadNumber;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 ulPadNumber = IPT_g_hNextParameter->u_ElementUnion.swPadNumber;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
 IPT_g_hNextParameter ++;
 if (IPT_g_hInputStructure.p_ucValideAndActiveDevice[IPT_E_Pad00DeviceEvent+ulPadNumber]==IPT_C_ActivatePadDevice)
 {
  switch (IPT_g_hNextParameter->u_ElementUnion.swPadAction)
  {
   case IPT_E_PadUp:
    ucReturn = (  fn_wJoyIsUp((short)ulPadNumber)==C_wJoyTrue
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]>=IPT_g_hNextParameter->ucMinCounterInput)
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
	           )?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadDown:
    ucReturn = (  fn_wJoyIsDown((short)ulPadNumber)==C_wJoyTrue
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]>=IPT_g_hNextParameter->ucMinCounterInput)
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
	           )?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadLeft:
    ucReturn = (  fn_wJoyIsLeft((short)ulPadNumber)==C_wJoyTrue
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]>=IPT_g_hNextParameter->ucMinCounterInput)
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
	           )?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadRight:
    ucReturn = (  fn_wJoyIsRight((short)ulPadNumber)==C_wJoyTrue
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]>=IPT_g_hNextParameter->ucMinCounterInput)
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
	           )?IPT_C_TRUE:IPT_C_FALSE;
    break;
   default: /* Button ?*/
    if (IPT_g_hNextParameter->u_ElementUnion.swPadAction>=IPT_E_PadFirstButton&&IPT_g_hNextParameter->u_ElementUnion.swPadAction<=IPT_E_PadLastButton)
    {
     ucReturn = (  fn_wJoyIsButtonPressed((short)ulPadNumber,IPT_g_ulPadAndJoyButtonFlag[IPT_g_hNextParameter->u_ElementUnion.swPadAction-IPT_E_PadFirstButton])==C_wJoyTrue
                 &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]>=IPT_g_hNextParameter->ucMinCounterInput)
                 &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
	            )?IPT_C_TRUE:IPT_C_FALSE;
    
    }
  }
 }
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement)));*/
 IPT_g_hNextParameter ++;
 
/* ANNECY AV DEMO {*/
#ifndef U64
 IPT_g_bAtLeastOneActionIsValidated |= ucReturn;
#endif
/* END ANNECY AV }*/
 
 return(ucReturn);
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_PadReleased(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 unsigned long ulPadNumber;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 ulPadNumber = IPT_g_hNextParameter->u_ElementUnion.swPadNumber;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
 IPT_g_hNextParameter ++;
 if (IPT_g_hInputStructure.p_ucValideAndActiveDevice[IPT_E_Pad00DeviceEvent+ulPadNumber]==IPT_C_ActivatePadDevice)
 {
  switch (IPT_g_hNextParameter->u_ElementUnion.swPadAction)
  {
   case IPT_E_PadUp:
    ucReturn = (  fn_wJoyIsUp((short)ulPadNumber)==C_wJoyFalse
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]>=IPT_g_hNextParameter->ucMinCounterInput)
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
	           )?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadDown:
    ucReturn = (  fn_wJoyIsDown((short)ulPadNumber)==C_wJoyFalse
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]>=IPT_g_hNextParameter->ucMinCounterInput)
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
	           )?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadLeft:
    ucReturn = (  fn_wJoyIsLeft((short)ulPadNumber)==C_wJoyFalse
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]>=IPT_g_hNextParameter->ucMinCounterInput)
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
	           )?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadRight:
    ucReturn = (  fn_wJoyIsRight((short)ulPadNumber)==C_wJoyFalse
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]>=IPT_g_hNextParameter->ucMinCounterInput)
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
	           )?IPT_C_TRUE:IPT_C_FALSE;
    break;
   default: /* Button ?*/
    if (IPT_g_hNextParameter->u_ElementUnion.swPadAction>=IPT_E_PadFirstButton&&IPT_g_hNextParameter->u_ElementUnion.swPadAction<=IPT_E_PadLastButton)
    {
     ucReturn = (  fn_wJoyIsButtonPressed((short)ulPadNumber,IPT_g_ulPadAndJoyButtonFlag[IPT_g_hNextParameter->u_ElementUnion.swPadAction-IPT_E_PadFirstButton])==C_wJoyFalse
                 &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]>=IPT_g_hNextParameter->ucMinCounterInput)
                 &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
	            )?IPT_C_TRUE:IPT_C_FALSE;
    
    }
  }
 }
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement)));*/
 IPT_g_hNextParameter ++;
 
 return(ucReturn);
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_JoystickAxeValue(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 unsigned long ulJoyNumber;
 unsigned long ulActionNumber;
 long lMinValue,lMaxValue;
 double dfPosition;
 


 IPT_g_hNextParameter = _hKeyWordElement+1;
 ulJoyNumber = IPT_g_hNextParameter->u_ElementUnion.swJoyNumber;

 IPT_g_hNextParameter++;
 ulActionNumber = IPT_g_hNextParameter->u_ElementUnion.swJoyAction;

 IPT_g_hNextParameter ++;
 lMinValue = IPT_g_hNextParameter->u_ElementUnion.swJoyValueMin;
 
 IPT_g_hNextParameter ++;
 lMaxValue = IPT_g_hNextParameter->u_ElementUnion.swJoyValueMax;
 

 if (IPT_g_hInputStructure.p_ucValideAndActiveDevice[IPT_E_Pad00DeviceEvent+ulJoyNumber]==IPT_C_ActivateJoystickDevice)
 {
  switch (ulActionNumber)
  {
   case IPT_E_JoyXValue:
    fn_wJoyGetCurrentPosition((short)ulJoyNumber,C_ulJoyX,&dfPosition);
    break;
   case IPT_E_JoyYValue:
    fn_wJoyGetCurrentPosition((short)ulJoyNumber,C_ulJoyY,&dfPosition);
    break;
   case IPT_E_JoyZValue:
    fn_wJoyGetCurrentPosition((short)ulJoyNumber,C_ulJoyZ,&dfPosition);
    break;
   case IPT_E_JoyRValue:
    fn_wJoyGetCurrentPosition((short)ulJoyNumber,C_ulJoyR,&dfPosition);
    break;
   case IPT_E_JoyUValue:
    fn_wJoyGetCurrentPosition((short)ulJoyNumber,C_ulJoyU,&dfPosition);
    break;
   case IPT_E_JoyVValue:
    fn_wJoyGetCurrentPosition((short)ulJoyNumber,C_ulJoyV,&dfPosition);
    break;
  }
  ucReturn = ((long)(dfPosition*100)>=lMinValue&&(long)(dfPosition*100)<=lMaxValue)?IPT_C_TRUE:IPT_C_FALSE;
  if (ucReturn==IPT_C_TRUE)
/*   g_h_ActualEntryInput->scAnalogicValue = (signed char)(dfPosition*100);*/
   g_h_ActualEntryInput->xAnalogicValue = (float)(dfPosition*100);
 }
 
 /*IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(IPT_g_hNextParameter);*/
 IPT_g_hNextParameter ++;
 
 return(ucReturn);
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_JoystickJustPressed(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 unsigned long ulJoyNumber;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 ulJoyNumber = IPT_g_hNextParameter->u_ElementUnion.swJoyNumber;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
 IPT_g_hNextParameter ++;
 if (IPT_g_hInputStructure.p_ucValideAndActiveDevice[IPT_E_Pad00DeviceEvent+ulJoyNumber]==IPT_C_ActivateJoystickDevice)
 {
  if (IPT_g_hNextParameter->u_ElementUnion.swJoyAction>=IPT_E_JoyFirstButton&&IPT_g_hNextParameter->u_ElementUnion.swJoyAction<=IPT_E_JoyLastButton)
   ucReturn = (INO_fn_wJoystickButtonJustPressed((short)ulJoyNumber,IPT_g_ulPadAndJoyButtonFlag[IPT_g_hNextParameter->u_ElementUnion.swPadAction-IPT_E_JoyFirstButton])==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
 }
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement)));*/
 IPT_g_hNextParameter ++;
 
/* ANNECY AV DEMO {*/
#ifndef U64
 IPT_g_bAtLeastOneActionIsValidated |= ucReturn;
#endif
/* END ANNECY AV }*/
 
 return(ucReturn);
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_JoystickJustReleased(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 unsigned long ulJoyNumber;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 ulJoyNumber = IPT_g_hNextParameter->u_ElementUnion.swJoyNumber;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
 IPT_g_hNextParameter ++;
 if (IPT_g_hInputStructure.p_ucValideAndActiveDevice[IPT_E_Pad00DeviceEvent+ulJoyNumber]==IPT_C_ActivateJoystickDevice)
 {
  if (IPT_g_hNextParameter->u_ElementUnion.swJoyAction>=IPT_E_JoyFirstButton&&IPT_g_hNextParameter->u_ElementUnion.swJoyAction<=IPT_E_JoyLastButton)
   ucReturn = (INO_fn_wJoystickButtonJustReleased((short)ulJoyNumber,IPT_g_ulPadAndJoyButtonFlag[IPT_g_hNextParameter->u_ElementUnion.swPadAction-IPT_E_JoyFirstButton])==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
 }
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement)));*/
 IPT_g_hNextParameter ++;
 
 return(ucReturn);
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_JoystickPressed(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 unsigned long ulJoyNumber;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 ulJoyNumber = IPT_g_hNextParameter->u_ElementUnion.swJoyNumber;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
 IPT_g_hNextParameter ++;
 if (IPT_g_hInputStructure.p_ucValideAndActiveDevice[IPT_E_Pad00DeviceEvent+ulJoyNumber]==IPT_C_ActivateJoystickDevice)
 {
  if (IPT_g_hNextParameter->u_ElementUnion.swJoyAction>=IPT_E_JoyFirstButton&&IPT_g_hNextParameter->u_ElementUnion.swJoyAction<=IPT_E_JoyLastButton)
  {
   ucReturn = (  fn_wJoyIsButtonPressed((short)ulJoyNumber,IPT_g_ulPadAndJoyButtonFlag[IPT_g_hNextParameter->u_ElementUnion.swPadAction-IPT_E_JoyFirstButton])==C_wJoyTrue
               &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulJoyNumber][IPT_g_hNextParameter->u_ElementUnion.swJoyAction]>=IPT_g_hNextParameter->ucMinCounterInput)
               &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulJoyNumber][IPT_g_hNextParameter->u_ElementUnion.swJoyAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
 	            )?IPT_C_TRUE:IPT_C_FALSE;
  }
 }
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement)));*/
 IPT_g_hNextParameter ++;
 
/* ANNECY AV DEMO {*/
#ifndef U64
 IPT_g_bAtLeastOneActionIsValidated |= ucReturn;
#endif
/* END ANNECY AV }*/
 
 return(ucReturn);
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_JoystickReleased(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 unsigned long ulJoyNumber;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 ulJoyNumber = IPT_g_hNextParameter->u_ElementUnion.swJoyNumber;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
 IPT_g_hNextParameter ++;
 if (IPT_g_hInputStructure.p_ucValideAndActiveDevice[IPT_E_Pad00DeviceEvent+ulJoyNumber]==IPT_C_ActivateJoystickDevice)
 {
  if (IPT_g_hNextParameter->u_ElementUnion.swJoyAction>=IPT_E_JoyFirstButton&&IPT_g_hNextParameter->u_ElementUnion.swJoyAction<=IPT_E_JoyLastButton)
  {
   ucReturn = (  fn_wJoyIsButtonPressed((short)ulJoyNumber,IPT_g_ulPadAndJoyButtonFlag[IPT_g_hNextParameter->u_ElementUnion.swPadAction-IPT_E_JoyFirstButton])==C_wJoyFalse
               &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulJoyNumber][IPT_g_hNextParameter->u_ElementUnion.swJoyAction]>=IPT_g_hNextParameter->ucMinCounterInput)
               &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulJoyNumber][IPT_g_hNextParameter->u_ElementUnion.swJoyAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
 	            )?IPT_C_TRUE:IPT_C_FALSE;
  }
 }
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement)));*/
 IPT_g_hNextParameter ++;
 
 return(ucReturn);
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_JoystickOrPadJustPressed(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 unsigned long ulPadNumber;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 ulPadNumber = IPT_g_hNextParameter->u_ElementUnion.swPadNumber;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
 IPT_g_hNextParameter ++;
 if (  IPT_g_hInputStructure.p_ucValideAndActiveDevice[IPT_E_Pad00DeviceEvent+ulPadNumber]==IPT_C_ActivateJoystickDevice
     ||IPT_g_hInputStructure.p_ucValideAndActiveDevice[IPT_E_Pad00DeviceEvent+ulPadNumber]==IPT_C_ActivatePadDevice)
 {
  switch (IPT_g_hNextParameter->u_ElementUnion.swPadAction)
  {
   case IPT_E_PadUp:
    ucReturn = (INO_fn_wJoystickJustUp((short)ulPadNumber)==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadDown:
    ucReturn = (INO_fn_wJoystickJustDown((short)ulPadNumber)==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadLeft:
    ucReturn = (INO_fn_wJoystickJustLeft((short)ulPadNumber)==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadRight:
    ucReturn = (INO_fn_wJoystickJustRight((short)ulPadNumber)==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
    break;
   default: /* Button ?*/
    if (IPT_g_hNextParameter->u_ElementUnion.swPadAction>=IPT_E_PadFirstButton&&IPT_g_hNextParameter->u_ElementUnion.swPadAction<=IPT_E_PadLastButton)
     ucReturn = (INO_fn_wJoystickButtonJustPressed((short)ulPadNumber,IPT_g_ulPadAndJoyButtonFlag[IPT_g_hNextParameter->u_ElementUnion.swPadAction-IPT_E_PadFirstButton])==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
  }
 }
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement)));*/
 IPT_g_hNextParameter ++;
 
/* ANNECY AV DEMO {*/
#ifndef U64
 IPT_g_bAtLeastOneActionIsValidated |= ucReturn;
#endif
/* END ANNECY AV }*/
 
 return(ucReturn);
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_JoystickOrPadJustReleased(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 unsigned long ulPadNumber;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 ulPadNumber = IPT_g_hNextParameter->u_ElementUnion.swPadNumber;
/*IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
 IPT_g_hNextParameter ++;
 if (  IPT_g_hInputStructure.p_ucValideAndActiveDevice[IPT_E_Pad00DeviceEvent+ulPadNumber]==IPT_C_ActivateJoystickDevice
     ||IPT_g_hInputStructure.p_ucValideAndActiveDevice[IPT_E_Pad00DeviceEvent+ulPadNumber]==IPT_C_ActivatePadDevice)
 {
  switch (IPT_g_hNextParameter->u_ElementUnion.swPadAction)
  {
   case IPT_E_PadUp:
    ucReturn = (INO_fn_wJoystickDirectionJustReleased((short)ulPadNumber,C_ulJoyUp)==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadDown:
    ucReturn = (INO_fn_wJoystickDirectionJustReleased((short)ulPadNumber,C_ulJoyDown)==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadLeft:
    ucReturn = (INO_fn_wJoystickDirectionJustReleased((short)ulPadNumber,C_ulJoyLeft)==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadRight:
    ucReturn = (INO_fn_wJoystickDirectionJustReleased((short)ulPadNumber,C_ulJoyRight)==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
    break;
   default: /* Button ?*/
    if (IPT_g_hNextParameter->u_ElementUnion.swPadAction>=IPT_E_PadFirstButton&&IPT_g_hNextParameter->u_ElementUnion.swPadAction<=IPT_E_PadLastButton)
     ucReturn = (INO_fn_wJoystickButtonJustReleased((short)ulPadNumber,IPT_g_ulPadAndJoyButtonFlag[IPT_g_hNextParameter->u_ElementUnion.swPadAction-IPT_E_PadFirstButton])==C_wJoyTrue)?IPT_C_TRUE:IPT_C_FALSE;
  }
 }
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement)));*/
 IPT_g_hNextParameter ++;
 
 return(ucReturn);
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_JoystickOrPadPressed(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 unsigned long ulPadNumber;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 ulPadNumber = IPT_g_hNextParameter->u_ElementUnion.swPadNumber;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
 IPT_g_hNextParameter ++;
 if (  IPT_g_hInputStructure.p_ucValideAndActiveDevice[IPT_E_Pad00DeviceEvent+ulPadNumber]==IPT_C_ActivateJoystickDevice
     ||IPT_g_hInputStructure.p_ucValideAndActiveDevice[IPT_E_Pad00DeviceEvent+ulPadNumber]==IPT_C_ActivatePadDevice)
 {
  switch (IPT_g_hNextParameter->u_ElementUnion.swPadAction)
  {
   case IPT_E_PadUp:
    ucReturn = (  fn_wJoyIsUp((short)ulPadNumber)==C_wJoyTrue
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]>=IPT_g_hNextParameter->ucMinCounterInput)
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
	           )?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadDown:
    ucReturn = (  fn_wJoyIsDown((short)ulPadNumber)==C_wJoyTrue
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]>=IPT_g_hNextParameter->ucMinCounterInput)
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
	           )?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadLeft:
    ucReturn = (  fn_wJoyIsLeft((short)ulPadNumber)==C_wJoyTrue
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]>=IPT_g_hNextParameter->ucMinCounterInput)
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
	           )?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadRight:
    ucReturn = (  fn_wJoyIsRight((short)ulPadNumber)==C_wJoyTrue
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]>=IPT_g_hNextParameter->ucMinCounterInput)
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
	           )?IPT_C_TRUE:IPT_C_FALSE;
    break;
   default: /* Button ?*/
    if (IPT_g_hNextParameter->u_ElementUnion.swPadAction>=IPT_E_PadFirstButton&&IPT_g_hNextParameter->u_ElementUnion.swPadAction<=IPT_E_PadLastButton)
    {
     ucReturn = (  fn_wJoyIsButtonPressed((short)ulPadNumber,IPT_g_ulPadAndJoyButtonFlag[IPT_g_hNextParameter->u_ElementUnion.swPadAction-IPT_E_PadFirstButton])==C_wJoyTrue
                 &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]>=IPT_g_hNextParameter->ucMinCounterInput)
                 &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
	            )?IPT_C_TRUE:IPT_C_FALSE;
    
    }
  }
 }
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement)));*/
 IPT_g_hNextParameter ++;
 
/* ANNECY AV DEMO {*/
#ifndef U64
 IPT_g_bAtLeastOneActionIsValidated |= ucReturn;
#endif
/* END ANNECY AV }*/
 
 return(ucReturn);
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_JoystickOrPadReleased(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 unsigned long ulPadNumber;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 ulPadNumber = IPT_g_hNextParameter->u_ElementUnion.swPadNumber;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
 IPT_g_hNextParameter ++;
 if (  IPT_g_hInputStructure.p_ucValideAndActiveDevice[IPT_E_Pad00DeviceEvent+ulPadNumber]==IPT_C_ActivateJoystickDevice
     ||IPT_g_hInputStructure.p_ucValideAndActiveDevice[IPT_E_Pad00DeviceEvent+ulPadNumber]==IPT_C_ActivatePadDevice)
 {
  switch (IPT_g_hNextParameter->u_ElementUnion.swPadAction)
  {
   case IPT_E_PadUp:
    ucReturn = (  fn_wJoyIsUp((short)ulPadNumber)==C_wJoyFalse
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]>=IPT_g_hNextParameter->ucMinCounterInput)
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
	           )?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadDown:
    ucReturn = (  fn_wJoyIsDown((short)ulPadNumber)==C_wJoyFalse
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]>=IPT_g_hNextParameter->ucMinCounterInput)
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
	           )?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadLeft:
    ucReturn = (  fn_wJoyIsLeft((short)ulPadNumber)==C_wJoyFalse
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]>=IPT_g_hNextParameter->ucMinCounterInput)
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
	           )?IPT_C_TRUE:IPT_C_FALSE;
    break;
   case IPT_E_PadRight:
    ucReturn = (  fn_wJoyIsRight((short)ulPadNumber)==C_wJoyFalse
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]>=IPT_g_hNextParameter->ucMinCounterInput)
                &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
	           )?IPT_C_TRUE:IPT_C_FALSE;
    break;
   default: /* Button ?*/
    if (IPT_g_hNextParameter->u_ElementUnion.swPadAction>=IPT_E_PadFirstButton&&IPT_g_hNextParameter->u_ElementUnion.swPadAction<=IPT_E_PadLastButton)
    {
     ucReturn = (  fn_wJoyIsButtonPressed((short)ulPadNumber,IPT_g_ulPadAndJoyButtonFlag[IPT_g_hNextParameter->u_ElementUnion.swPadAction-IPT_E_PadFirstButton])==C_wJoyFalse
                 &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]>=IPT_g_hNextParameter->ucMinCounterInput)
                 &&(IPT_g_hInputStructure.p_ucPadAndJoyCounter[ulPadNumber][IPT_g_hNextParameter->u_ElementUnion.swPadAction]<=IPT_g_hNextParameter->ucMaxCounterInput)
	            )?IPT_C_TRUE:IPT_C_FALSE;
    
    }
  }
 }
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement)));*/
 IPT_g_hNextParameter ++;
 
 return(ucReturn);
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_ActionJustValidated(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 ucReturn = (IPT_fn_bIsJustValidated(IPT_g_hNextParameter->u_ElementUnion.hEntryElement)==IPT_C_TRUE)?IPT_C_TRUE:IPT_C_FALSE;
 IPT_g_hNextParameter ++;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
 
 return(ucReturn);
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_ActionValidated(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 ucReturn = (IPT_fn_bIsValidated(IPT_g_hNextParameter->u_ElementUnion.hEntryElement)==IPT_C_TRUE)?IPT_C_TRUE:IPT_C_FALSE;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
 IPT_g_hNextParameter ++;
 
 return(ucReturn);
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_ActionJustInvalidated(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 
/* Oliv' - Portage v15 - Someone forgot something here ?*/
/*
// IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);
 ucReturn = (IPT_fn_bIsJustInvalidated(IPT_g_hNextParameter->u_ElementUnion.hEntryElement)==IPT_C_TRUE)?IPT_C_TRUE:IPT_C_FALSE;
 IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));
*/
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 ucReturn = (IPT_fn_bIsJustInvalidated(IPT_g_hNextParameter->u_ElementUnion.hEntryElement)==IPT_C_TRUE)?IPT_C_TRUE:IPT_C_FALSE;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
 IPT_g_hNextParameter ++;
/* EndOfOliv'*/
 
 return(ucReturn);
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_ActionInvalidated(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 ucReturn = (IPT_fn_bIsInvalidated(IPT_g_hNextParameter->u_ElementUnion.hEntryElement)==IPT_C_TRUE)?IPT_C_TRUE:IPT_C_FALSE;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
 IPT_g_hNextParameter ++;
 
 return(ucReturn);
}
 
/*************************************************************************/
 
unsigned char IPT_fn_bIsKeyWordValid_Sequence(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 unsigned long i;
 
 IPT_g_ulSequenceAnalyseNumber = 0;
 ucReturn = IPT_C_TRUE;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
 IPT_g_hNextParameter = _hKeyWordElement+2;
/* for (i=0;ucReturn&&i<LST2_M_DynamicGetNextElement(_hKeyWordElement)->u_ElementUnion.ulNumberOfSequence;i++)*/
 for (i=0;ucReturn&&i<(_hKeyWordElement+1)->u_ElementUnion.ulNumberOfSequence;i++)
 {
  ucReturn &= (IPT_fn_bIsKeyWordValid(IPT_g_hNextParameter)==IPT_C_TRUE)
              ?IPT_C_TRUE:IPT_C_FALSE;
 }
 
 return(ucReturn);
}
/*************************************************************************/
unsigned char IPT_fn_bIsKeyWordValid_SequenceKey(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 
 ucReturn = (
               (IPT_g_hInputStructure.hEventHistoric[IPT_g_ulSequenceAnalyseNumber].bf6DeviceType==IPT_E_KeyboardDeviceEvent)
             &&(IPT_g_hInputStructure.hEventHistoric[IPT_g_ulSequenceAnalyseNumber].bf2State==IPT_E_Stopped)
             &&(IPT_g_hInputStructure.hEventHistoric[IPT_g_ulSequenceAnalyseNumber].swDeviceValue==IPT_g_hNextParameter->u_ElementUnion.swKey)
             &&(IPT_g_hInputStructure.hEventHistoric[IPT_g_ulSequenceAnalyseNumber].ucCounter>=IPT_g_hNextParameter->ucMinCounterInput)
             &&(IPT_g_hInputStructure.hEventHistoric[IPT_g_ulSequenceAnalyseNumber].ucCounter<=IPT_g_hNextParameter->ucMaxCounterInput)
            )?IPT_C_TRUE:IPT_C_FALSE;
 /* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
  IPT_g_hNextParameter++;
  IPT_g_ulSequenceAnalyseNumber++;
 
 return(ucReturn);
}
/*************************************************************************/
unsigned char IPT_fn_bIsKeyWordValid_SequenceKeyEnd(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 
 ucReturn = (
               (IPT_g_hInputStructure.hEventHistoric[IPT_g_ulSequenceAnalyseNumber].bf6DeviceType==IPT_E_KeyboardDeviceEvent)
             &&(IPT_g_hInputStructure.hEventHistoric[IPT_g_ulSequenceAnalyseNumber].bf2State==IPT_E_Stopping)
             &&(IPT_g_hInputStructure.hEventHistoric[IPT_g_ulSequenceAnalyseNumber].swDeviceValue==IPT_g_hNextParameter->u_ElementUnion.swKey)
             &&(IPT_g_hInputStructure.hEventHistoric[IPT_g_ulSequenceAnalyseNumber].ucCounter>=IPT_g_hNextParameter->ucMinCounterInput)
             &&(IPT_g_hInputStructure.hEventHistoric[IPT_g_ulSequenceAnalyseNumber].ucCounter<=IPT_g_hNextParameter->ucMaxCounterInput)
            )?IPT_C_TRUE:IPT_C_FALSE;
 /* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
  IPT_g_hNextParameter++;
IPT_g_ulSequenceAnalyseNumber++;
 
 return(ucReturn);
}
/*************************************************************************/
unsigned char IPT_fn_bIsKeyWordValid_SequencePad(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 unsigned long ulPadNumber;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 ulPadNumber = IPT_g_hNextParameter->u_ElementUnion.swPadNumber;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
 IPT_g_hNextParameter ++;
 
 ucReturn = (
               (IPT_g_hInputStructure.hEventHistoric[IPT_g_ulSequenceAnalyseNumber].bf6DeviceType==ulPadNumber+IPT_E_Pad00DeviceEvent)
             &&(IPT_g_hInputStructure.hEventHistoric[IPT_g_ulSequenceAnalyseNumber].bf2State==IPT_E_Stopped)
             &&(IPT_g_hInputStructure.hEventHistoric[IPT_g_ulSequenceAnalyseNumber].swDeviceValue==IPT_g_hNextParameter->u_ElementUnion.swPadAction)
             &&(IPT_g_hInputStructure.hEventHistoric[IPT_g_ulSequenceAnalyseNumber].ucCounter>=IPT_g_hNextParameter->ucMinCounterInput)
             &&(IPT_g_hInputStructure.hEventHistoric[IPT_g_ulSequenceAnalyseNumber].ucCounter<=IPT_g_hNextParameter->ucMaxCounterInput)
            )?IPT_C_TRUE:IPT_C_FALSE;
 /* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement)));*/
 IPT_g_hNextParameter ++;
 IPT_g_ulSequenceAnalyseNumber++;
 
 return(ucReturn);
}
/*************************************************************************/
unsigned char IPT_fn_bIsKeyWordValid_SequencePadEnd(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 unsigned long ulPadNumber;
 
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(_hKeyWordElement);*/
 IPT_g_hNextParameter = _hKeyWordElement+1;
 ulPadNumber = IPT_g_hNextParameter->u_ElementUnion.swPadNumber;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement));*/
 IPT_g_hNextParameter ++;
 
 ucReturn = (
               (IPT_g_hInputStructure.hEventHistoric[IPT_g_ulSequenceAnalyseNumber].bf6DeviceType==ulPadNumber+IPT_E_Pad00DeviceEvent)
             &&(IPT_g_hInputStructure.hEventHistoric[IPT_g_ulSequenceAnalyseNumber].bf2State==IPT_E_Stopping)
             &&(IPT_g_hInputStructure.hEventHistoric[IPT_g_ulSequenceAnalyseNumber].swDeviceValue==IPT_g_hNextParameter->u_ElementUnion.swPadAction)
             &&(IPT_g_hInputStructure.hEventHistoric[IPT_g_ulSequenceAnalyseNumber].ucCounter>=IPT_g_hNextParameter->ucMinCounterInput)
             &&(IPT_g_hInputStructure.hEventHistoric[IPT_g_ulSequenceAnalyseNumber].ucCounter<=IPT_g_hNextParameter->ucMaxCounterInput)
            )?IPT_C_TRUE:IPT_C_FALSE;
/* IPT_g_hNextParameter = LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(LST2_M_DynamicGetNextElement(_hKeyWordElement)));*/
 IPT_g_hNextParameter ++;
 IPT_g_ulSequenceAnalyseNumber++;
 
 return(ucReturn);
}
/*************************************************************************/
#ifndef _FIRE_DEADCODE_U64_
unsigned char IPT_fn_bIsKeyWordValid_NameOfKeyWord(IPT_tdxHandleToKeyWordElement _hKeyWordElement)
{
 unsigned char ucReturn = IPT_C_FALSE;
 
 return(ucReturn);
}
#endif /* _FIRE_DEADCODE_U64_ */
/*************************************************************************/
 
