reman3/Rayman_X/cpa/tempgrp/TIA/Inc/CFast_1.hpp

46 lines
1.6 KiB
C++

/******************************************************************************
* CFast_1.hpp : passage de l'ia en C, 1ère passe
* auteur : Fred "Bart" Compagnon
******************************************************************************/
//#include "ai.h"
#define CFAST_DEBUG_FIRST_PASS
typedef struct CFast_tdstNode_
{
tdstNodeInterpret stNode;
tdstNodeInterpret stMiscellaneousNode;
char* d_cOptimisedNode;
long lIndexOfRef; // = -1 if i'm not a reference !
unsigned char ucIndexOfEvalParam; // 0 if no need to memorise value => index starts at 1 !
unsigned char ucNumberOfParamNeeded; // 0 if no param in input
unsigned char ucNumberOfNodeToSkipAfterOptimisation;
BOOL bAffectWithGetVector;
BOOL bIsABooleanDsgVarRef;
BOOL bIsACondition ;
BOOL bIsATernOpParam ;
} CFast_tdstNode;
typedef struct CFast_tdstComportTree_
{
//char szName[256]; ?
//long CFast_lMyIndex; ?
struct CFast_tdstNode_* p_stCFastNode;
unsigned short uwNbNode;
unsigned short uwNbMetaAction; // Nb de MetaAction
unsigned short uwNbStopEngine; // Nb de BloquantMoteur
char* d_cDeclarations;
} CFast_tdstComportTree;
#if defined (CFAST_DEBUG_FIRST_PASS)
void CFast_FirstPassOpening() ;
long lCFast_FirstPassClosing() ;
#endif //defined (CFAST_DEBUG_FIRST_PASS)
CFast_tdstComportTree* CFast_FirstPassInitComport ( tdstComport* p_stComport ) ;
CFast_tdstComportTree* CFast_FirstPassInitSubr ( tdstMacro* p_stMacro ) ;
void CFast_FirstPassDesinit () ;
void CFast_FirstPassFillTreeComport ( CFast_tdstComportTree* p_stFastTree, tdstComport* p_stComport ) ;
void CFast_FirstPassFillTreeSubr ( CFast_tdstComportTree* p_stFastTree, tdstMacro* p_stMacro ) ;