/**************************************************************************************
 
                File        : TDE_INIT.H
                Author      : Delattre Franck & Valérie Cluzel
                Last update : 21 / 02 / 97
 
Three types of functions:
        - Initialization functions
        - functions used to change a field
        - liberation functions
 
***************************************************************************************/
 
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You must do : 
#define TDE_GLOBALS 
in one (and only one) .c file of your Module.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
 
/* To avoid unnecessary includes :  */
#ifndef  __TDE_INIT_H
#define __TDE_INIT_H
 
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
 
 
/* For DLLs who are using this module : */ 
#undef 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
 
 
/* For Global declaration in C files : */
#ifndef TDE_GLOBALS
 #define __TDE_EXTERN extern
#else /* !TDE_GLOBALS */
 #define __TDE_EXTERN
#endif /* !TDE_GLOBALS */
 
/*
-----------------------------------------------------------------------------
INCLUDES FILES :
Include here any other header files of your module you need !
Ex : 
#include "toto.h"
Note : Do Not include header files from other Modules (do this in C files 
only)
-----------------------------------------------------------------------------
*/
 
/*
-----------------------------------------------------------------------------
CONSTANT DECLARATION:
Ex :
#define TDE_C_LMAX 100
-----------------------------------------------------------------------------
*/
 
/*
-----------------------------------------------------------------------------
TYPES DEFINITION : 
Declare here any type you need, and constant you need to do this :
Ex :              typedef struct TDE_tdstToto_
{
        long aLMAX_lBuffer[TDE_C_LMAX];
    ...
} TDE_tdst_Toto ;
-----------------------------------------------------------------------------
*/
 
/*
-----------------------------------------------------------------------------
GLOBAL VARIABLE DECLARATION :
Ex : 
__TDE_EXTERN <type> <variable name>
 #ifdef TDE_GLOBALS
 = <initial values>
 #endif
 ;
-----------------------------------------------------------------------------
*/
 
/*
-----------------------------------------------------------------------------
FUNCTIONS DECLARATION:
-----------------------------------------------------------------------------
*/
 
/*********************************************************************
 
        TDE_INIT.H
        First part : INITIALIZATION FUNCTIONS
        
        - TDE_vInitPictureAttributes
        - TDE_vInitCamera
        - TDE_vInitSuperObject
        - TDE_vInitSuperObjectWithSprite
        - TDE_vInitLine
        - TDE_vInitSprite
        - TDE_vInitMemSprite
        - TDE_vInitMemSpriteWithoutSO
        - TDE_vInitTextBox
        - TDE_vCreateMenuBitmapFont
        - TDE_vCreateTrueTypeFont
        - TDE_vInitTransparencyTable
                
**********************************************************************/
 
 
extern void TDE_vInitPictureAttributes(TDE_tdsPictureAttributes **h_stPicture,
                                        TDE_tdxValue xWidth,
                                        TDE_tdxValue xHeight,
                                        TDE_tdxValue xSrcPitch,
                                        TDE_tdLP_SOURCE lp_Data,
                                        TDE_tdLP_SURF   lp_DDS);
 
                                        
extern void TDE_vInitCamera(TDE_tdsCamera *stCamera);
 
extern void TDE_vInitSuperObject(TDE_tdsSuperObject **h_stSuperObject,
                                   short sPriority,
                                  TDE_tdsSuperObject *p_stChild,
                                  TDE_tdsSuperObject *p_stLeftBrother,
                                  TDE_tdsSuperObject *p_stRightBrother,
                                  TDE_tdsSuperObject *p_stFather,
                                  TDE_tdeType eType,
                                  TDE_tdxAngle xAngle,
                                  TDE_tdxValue xZX,
                                  TDE_tdxValue xZY,
                                  TDE_tdxValue xCenterX,
                                  TDE_tdxValue xCenterY,
                                  long lArea,
                                  long lObject);
 
extern void TDE_vInitSuperObjectWithSprite(TDE_tdsSuperObject **h_stSuperObject,
                                            TDE_tdsSprite      *p_stSprite,
                                            short sPriority,
                                            TDE_tdsSuperObject *p_stChild,
                                            TDE_tdsSuperObject *p_stLeftBrother,
                                            TDE_tdsSuperObject *p_stRightBrother,
                                            TDE_tdsSuperObject *p_stFather,
                                            TDE_tdxAngle xAngle,
                                            TDE_tdxValue xZX,
                                            TDE_tdxValue xZY,
                                            TDE_tdxValue xCenterX,
                                            TDE_tdxValue xCenterY,
                                            long lArea,
                                            long lObject);
                                  
 
extern void TDE_vInitLine(TDE_tdsSuperObject *p_SuperObject,
                           TDE_tdxValue xLength,
                           long lColor);
 
                           
extern void TDE_vInitSprite  (TDE_tdsSuperObject *p_SuperObject,
                              TDE_tdxValue xWidth,
                              TDE_tdxValue xHeight,
                              TDE_tdxValue xXs,
                              TDE_tdxValue xYs,
                              TDE_tdxPixel *v_pData,
                              CHAR  cFlip,
                              CHAR  c_NZ,
                              CHAR  cSemiTransparent,
                              TDE_tdsPictureAttributes *p_stPicture);
 
                              
extern void TDE_vInitMemSprite (TDE_tdsSuperObject *p_SuperObject,
                                TDE_tdxPixel *v_pData,
                                CHAR  c_NZ);
                                
extern void TDE_vInitMemSpriteWithoutSO (TDE_tdsSprite **p_stSprite,
                                         TDE_tdxPixel *v_pData,
                                         CHAR  c_NZ);
                                         
extern void TDE_vInitTextBox  (TDE_tdsSuperObject   *p_SuperObject,
                               TDE_tdeFontType      eFontType,
                               void                 *p_stFont,
                               unsigned long        ulStyle);
                               
extern void TDE_vCreateBitmapFont(TDE_tdsBitmapFont **BFont);
 
extern void TDE_vCreateTrueTypeFont(TDE_tdsTrueTypeFont **TFont);
 
extern void TDE_vInitTransparencyTable();
 
 
/*********************************************************************
 
        TDE_INIT.H
        Second part : FUNCTIONS USED TO CHANGE A STRUCTURE FIELD
        
        - TDE_vSetSourcePointer
        - TDE_vSetSuperObjectDescendantsSourcePointer
        - TDE_vSetSourcePitch
        - TDE_vSetSuperObjectDescendantsSourcePitch
        - TDE_vChangeFormatRectangle
        - TDE_vChangeClipRectangle
        - TDE_vMoveFormatRectangle
        - TDE_vMoveClipRectangle
        - TDE_vChangeTextInTheBox
        - TDE_vChangeCursorType
        - TDE_vChangeCursorPosition
        - TDE_vChangeSuperObjetCoordinates
        - TDE_vChangeSuperObjetScale
        - TDE_vChangeSuperObjetAngle
        - TDE_vChangeSuperObjectFlip
        - TDE_vChangeSuperObjectAlpha
        - TDE_vChangeSuperObjectDescendantsAlpha
        - TDE_vChangeSuperObjectSemiTransparency
        - TDE_vChangeSuperObjectDescendantsSemiTransparency        
        - TDE_vChangeSourceCoordinates
                
**********************************************************************/
 
 
extern void TDE_vSetSourcePointer(TDE_tdsSuperObject *p_stSuperObject, TDE_tdLP_SOURCE lp_Data);
 
extern void TDE_vSetSuperObjectDescendantsSourcePointer(TDE_tdsSuperObject *p_stSuperObject, TDE_tdLP_SOURCE lp_Data);
 
extern void TDE_vSetSourcePitch(TDE_tdsSuperObject *p_stSuperObject, TDE_tdxValue xSrcPitch);
 
extern void TDE_vSetSuperObjectDescendantsSourcePitch(TDE_tdsSuperObject *p_stSuperObject, TDE_tdxValue xSrcPitch);
 
 
extern void TDE_vChangeFormatRectangle(TDE_tdsTextBox *Box, TDE_tdxValue xCornerX, TDE_tdxValue xCornerY, TDE_tdxValue xWidth, TDE_tdxValue xHeight);
 
extern void TDE_vChangeClipRectangle(TDE_tdsTextBox *Box, TDE_tdxValue xCornerX, TDE_tdxValue xCornerY, TDE_tdxValue xWidth, TDE_tdxValue xHeight);
 
extern void TDE_vMoveFormatRectangle(TDE_tdsTextBox *Box, TDE_tdxValue xDx, TDE_tdxValue xDy);
 
extern void TDE_vMoveClipRectangle(TDE_tdsTextBox *Box, TDE_tdxValue xDx, TDE_tdxValue xDy);
 
extern void TDE_vChangeTextInTheBox(TDE_tdsSuperObject *p_SuperObject, char *p_cText);
 
extern void TDE_vChangeCursorType  (TDE_tdsSuperObject *p_SuperObject,
                                    TDE_tdeCursorType  eType);
 
extern void TDE_vChangeCursorPosition  (TDE_tdsSuperObject *p_SuperObject,
                                        long               lPosition);
 
void TDE_vChangeColorModeInTextBox  (TDE_tdsSuperObject *p_SuperObject,
                                     char               cColorMode);
 
extern void TDE_vChangeSuperObjetCoordinates(TDE_tdsSuperObject *p_stSuperObject,
                                              TDE_tdxValue xX,
                                              TDE_tdxValue xY);
                                              
extern void TDE_vChangeSuperObjetScale(TDE_tdsSuperObject *p_stSuperObject,
                                        TDE_tdxValue xZX,
                                        TDE_tdxValue xZY);
 
 
extern void TDE_vChangeSuperObjetAngle(TDE_tdsSuperObject *p_stSuperObjet, TDE_tdxAngle xAngle);
 
 
 
extern void TDE_vChangeSuperObjectFlip(TDE_tdsSuperObject *p_stSuperObjet, char cFlip);
 
 
 
extern void TDE_vChangeSuperObjectAlpha(TDE_tdsSuperObject *p_stSuperObjet, TDE_tdxValue xAlpha);
 
 
 
extern void TDE_vChangeSuperObjectSemiTransparency(TDE_tdsSuperObject *p_stSuperObjet, char cSemiTransparent);
 
 
 
extern void TDE_vChangeSuperObjectDescendantsSemiTransparency(TDE_tdsSuperObject *p_stSuperObject, char cSemiTransparent);
 
 
 
extern void TDE_vChangeSuperObjectDescendantsAlpha(TDE_tdsSuperObject *p_stSuperObject, TDE_tdxValue xAlpha);
 
 
 
extern void TDE_vChangeSourceCoordinates(TDE_tdsSprite *p_stSprite,
                                           TDE_tdxValue xXs,
                                           TDE_tdxValue xYs);
 
 
 
/************************************************************************
 
        TDE_INIT.C
        Third part : Get Functions
 
        - TDE_eGetCursorType
        - TDE_lGetCursorPosition
*************************************************************************/
 
extern TDE_tdeCursorType TDE_eGetCursorType ( TDE_tdsSuperObject *p_SuperObject );
extern long TDE_lGetCursorPosition ( TDE_tdsSuperObject *p_SuperObject );
 
 
/*********************************************************************
 
        TDE_INIT.H
        Fourth part : LIBERATION FUNCTIONS
 
        - TDE_vReleaseBitmapFont
        - TDE_vReleaseTrueTypeFont
        - TDE_vReleaseMemSprite
        - TDE_vDestroyPictureAttributes
        - TDE_vDestroyTextBox
        - TDE_vDestroySuperObject
        - TDE_vDestroySuperObjectDescendants
                
**********************************************************************/
 
extern void TDE_vReleaseBitmapFont(TDE_tdsBitmapFont *BFont);
 
extern void TDE_vReleaseTrueTypeFont(TDE_tdsTrueTypeFont *TFont);
 
extern void TDE_vReleaseMemSprite(TDE_tdsSprite *p_stSprite);
 
extern void TDE_vDestroyPictureAttributes(TDE_tdsPictureAttributes **h_stPicture);
 
extern void TDE_vDestroyTextBox(TDE_tdsTextBox **h_stTextBox);
 
extern void TDE_vDestroySuperObject(TDE_tdsSuperObject **h_stSuperObject);
 
extern void TDE_vDestroySuperObjectDescendants(TDE_tdsSuperObject **h_stSuperObject);
 
#ifdef __cplusplus
};
#endif /* __cplusplus */
 
 
#endif /* __TDE_INIT_H  */
 
