/*=========================================================================
* IPT_Main.c : 
*     Variables declaration and init function
*
* (c) Ubi Studios 1997
*=======================================================================*/
 
#if !defined (__IPT_Main_H__)
#define __IPT_Main_H__
 
/******************************************/
#if _MSC_VER >= 1000
#pragma once
#endif /* _MSC_VER >= 1000 */
/******************************************/
 
/****************************************/
#if !defined(CPA_EXPORT)
#if defined(CPA_WANTS_IMPORT)
#define CPA_EXPORT __declspec(dllimport)
#elif defined(CPA_WANTS_EXPORT)
#define CPA_EXPORT __declspec(dllexport)
#else
#define CPA_EXPORT
#endif /*CPA_WANTS_IMPORT || CPA_WANTS_EXPORT*/
#endif /*CPA_EXPORT*/
/****************************************/
 
#undef EXTERN
#undef extern
#if !defined(D_IPT_Input_VariableDefine)
#define EXTERN extern
#else
#define EXTERN
#endif /* D_IPT_Input_VariableDefine*/
 
#if defined (__cplusplus)
extern "C"
{
#endif /* __cplusplus */
 
extern CPA_EXPORT void IPT_fn_vFirstInitInput();
extern CPA_EXPORT void IPT_fn_vInitMemory(unsigned long _ulMemSize);
 
/* GuS 13/08/98 : for snapshot load {*/
extern CPA_EXPORT void IPT_fn_vInitInputWhenLoadSnapshot( HINSTANCE hInstance, HWND hWindow );
extern CPA_EXPORT void IPT_fn_vDesinitInputWhenLoadSnapshot();
/* } Gus */
 
extern CPA_EXPORT void IPT_fn_vInitInput(short sHistoricSize,HINSTANCE hInstance,HWND hWindow);
extern CPA_EXPORT void IPT_fn_vDesinitInput(void);
extern CPA_EXPORT void IPT_fn_vResetInputEntry(void);
                           
extern CPA_EXPORT IPT_tdxHandleToEntryElement IPT_fn_hGetEntryActionHandleForOptions(char *_szKeyActionName);
extern CPA_EXPORT char *IPT_fn_szGetEntryActionName(IPT_tdxHandleToEntryElement hKeyActionHandle);
extern CPA_EXPORT unsigned char IPT_fn_bIsAValidEntryActionHandle(IPT_tdxHandleToEntryElement hKeyActionHandle);
 
extern CPA_EXPORT unsigned long IPT_fn_ulNumberOfEntryAction(void);
extern CPA_EXPORT char *IPT_fn_szEntryActionNumber(unsigned long _ulEntryAction);
 
extern CPA_EXPORT void IPT_fn_vActivateAllEntryElements ( void ) ;
extern CPA_EXPORT void IPT_fn_vActivateEntryElement(IPT_tdxHandleToEntryElement _hEntryElement);
extern CPA_EXPORT void IPT_fn_vDesactivateEntryElement(IPT_tdxHandleToEntryElement _hEntryElement);
extern CPA_EXPORT unsigned char IPT_fn_bGetActivationFlagOfEntryElement(IPT_tdxHandleToEntryElement _hEntryElement);
 
extern CPA_EXPORT char IPT_fn_cGetValidAsciiKey(char *p_szValideKey);
 
extern CPA_EXPORT void IPT_PrintUsedStaticMemory(void);
 
extern CPA_EXPORT unsigned char IPT_fn_bIsKeyboardControlAvailable(void);
extern CPA_EXPORT unsigned char IPT_fn_bIsJoystickControlAvailable(void);
extern CPA_EXPORT unsigned char IPT_fn_bIsPaddleControlAvailable(void);
 
extern CPA_EXPORT void IPT_fn_vDesactiveJoystickAndPadControl(void);
extern CPA_EXPORT void IPT_fn_vActiveJoystickControl(void);
extern CPA_EXPORT void IPT_fn_vActivePaddleControl(void);
 
extern CPA_EXPORT unsigned char IPT_fn_bChangeIPTValue(IPT_tdxHandleToEntryElement _hElement,unsigned char ucWhichTest);
extern CPA_EXPORT unsigned char IPT_fn_bModifyIPTAction ( IPT_tdxHandleToEntryElement _hElementToChange, IPT_tdxHandleToEntryElement _hReplacingElement ) ;
 
extern CPA_EXPORT char *IPT_fn_szGetStringOf(IPT_tdxHandleToEntryElement _hElement);
 
/**** In IPT_Scpt.c ****/
extern CPA_EXPORT void IPT_fn_vReadInputScript(char *_szName);
extern CPA_EXPORT void IPT_fn_vEndReadInputScript(void);
extern CPA_EXPORT IPT_tdxHandleToEntryElement IPT_fn_hGetEntryActionHandle(char *_szKeyActionName);
 
ACP_tdxBool IPT_fn_bAJoypadConnected();
ACP_tdxBool IPT_fn_bAKeyJustPressed();
ACP_tdxBool IPT_fn_bAButtonPadJustPressed();
 
void *IPT_fn_p_vAlloc(unsigned long lSize);
void IPT_fn_vFree(void **p_vPointer);
 
 
#if defined (__cplusplus)
}
#endif /* __cplusplus */
 
#undef EXTERN
#undef extern
 
#endif /* __IPT_Main_H__ */
