Pulled changes from test mingw branch
* include fixes * syntax fixes for MinGW * fixed encoding of restext.cpp * temporary fix for MinGW in joystick.cpp Successfully compiles under MinGW :)dev-ui
parent
a0303105b6
commit
011d86ed66
|
@ -29,6 +29,9 @@
|
||||||
|
|
||||||
#include "CBot.h"
|
#include "CBot.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// les divers constructeurs / destructeurs
|
// les divers constructeurs / destructeurs
|
||||||
// pour libérer tout selon l'arbre établi
|
// pour libérer tout selon l'arbre établi
|
||||||
CBotInstr::CBotInstr()
|
CBotInstr::CBotInstr()
|
||||||
|
@ -80,7 +83,7 @@ void CBotInstr::DecLvl()
|
||||||
}
|
}
|
||||||
|
|
||||||
// controle la validité d'un break ou continu
|
// controle la validité d'un break ou continu
|
||||||
BOOL CBotInstr::ChkLvl(CBotString& label, int type)
|
BOOL CBotInstr::ChkLvl(const CBotString& label, int type)
|
||||||
{
|
{
|
||||||
int i = m_LoopLvl;
|
int i = m_LoopLvl;
|
||||||
while (--i>=0)
|
while (--i>=0)
|
||||||
|
@ -291,7 +294,7 @@ CBotInstr* CBotInstr::Compile(CBotToken* &p, CBotCStack* pStack)
|
||||||
BOOL CBotInstr::Execute(CBotStack* &pj)
|
BOOL CBotInstr::Execute(CBotStack* &pj)
|
||||||
{
|
{
|
||||||
CBotString ClassManquante = name;
|
CBotString ClassManquante = name;
|
||||||
__asm int 3; // ne doit jamais passer par cette routine
|
ASM_TRAP(); // ne doit jamais passer par cette routine
|
||||||
// mais utiliser les routines des classes filles
|
// mais utiliser les routines des classes filles
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -306,26 +309,26 @@ BOOL CBotInstr::Execute(CBotStack* &pj, CBotVar* pVar)
|
||||||
void CBotInstr::RestoreState(CBotStack* &pj, BOOL bMain)
|
void CBotInstr::RestoreState(CBotStack* &pj, BOOL bMain)
|
||||||
{
|
{
|
||||||
CBotString ClassManquante = name;
|
CBotString ClassManquante = name;
|
||||||
__asm int 3; // ne doit jamais passer par cette routine
|
ASM_TRAP(); // ne doit jamais passer par cette routine
|
||||||
// mais utiliser les routines des classes filles
|
// mais utiliser les routines des classes filles
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOL CBotInstr::ExecuteVar(CBotVar* &pVar, CBotCStack* &pile)
|
BOOL CBotInstr::ExecuteVar(CBotVar* &pVar, CBotCStack* &pile)
|
||||||
{
|
{
|
||||||
__asm int 3; // papa sait pas faire, voir les filles
|
ASM_TRAP(); // papa sait pas faire, voir les filles
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CBotInstr::ExecuteVar(CBotVar* &pVar, CBotStack* &pile, CBotToken* prevToken, BOOL bStep, BOOL bExtend)
|
BOOL CBotInstr::ExecuteVar(CBotVar* &pVar, CBotStack* &pile, CBotToken* prevToken, BOOL bStep, BOOL bExtend)
|
||||||
{
|
{
|
||||||
__asm int 3; // papa sait pas faire, voir les filles
|
ASM_TRAP(); // papa sait pas faire, voir les filles
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBotInstr::RestoreStateVar(CBotStack* &pile, BOOL bMain)
|
void CBotInstr::RestoreStateVar(CBotStack* &pile, BOOL bMain)
|
||||||
{
|
{
|
||||||
__asm int 3; // papa sait pas faire, voir les filles
|
ASM_TRAP(); // papa sait pas faire, voir les filles
|
||||||
}
|
}
|
||||||
|
|
||||||
// cette routine n'est définie que pour la classe fille CBotCase
|
// cette routine n'est définie que pour la classe fille CBotCase
|
||||||
|
@ -538,7 +541,7 @@ void CBotLeftExprVar::RestoreState(CBotStack* &pj, BOOL bMain)
|
||||||
CBotVar* var1;
|
CBotVar* var1;
|
||||||
|
|
||||||
var1 = pj->FindVar(m_token.GivString());
|
var1 = pj->FindVar(m_token.GivString());
|
||||||
if ( var1 == NULL ) __asm int 3;
|
if ( var1 == NULL ) ASM_TRAP();
|
||||||
|
|
||||||
var1->SetUniqNum(m_nIdent); // avec cet identificateur unique
|
var1->SetUniqNum(m_nIdent); // avec cet identificateur unique
|
||||||
}
|
}
|
||||||
|
@ -1777,7 +1780,7 @@ BOOL CBotExpression::Execute(CBotStack* &pj)
|
||||||
pile2->SetVar(result); // re-place le résultat
|
pile2->SetVar(result); // re-place le résultat
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
if (!IsInit)
|
if (!IsInit)
|
||||||
pile2->SetError(TX_NOTINIT, m_leftop->GivToken());
|
pile2->SetError(TX_NOTINIT, m_leftop->GivToken());
|
||||||
|
@ -2298,7 +2301,7 @@ CBotIndexExpr::~CBotIndexExpr()
|
||||||
BOOL CBotIndexExpr::ExecuteVar(CBotVar* &pVar, CBotCStack* &pile)
|
BOOL CBotIndexExpr::ExecuteVar(CBotVar* &pVar, CBotCStack* &pile)
|
||||||
{
|
{
|
||||||
if ( pVar->GivType(1) != CBotTypArrayPointer )
|
if ( pVar->GivType(1) != CBotTypArrayPointer )
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
|
|
||||||
pVar = ((CBotVarArray*)pVar)->GivItem(0, FALSE); // à la compilation rend l'élément [0]
|
pVar = ((CBotVarArray*)pVar)->GivItem(0, FALSE); // à la compilation rend l'élément [0]
|
||||||
if ( pVar == NULL )
|
if ( pVar == NULL )
|
||||||
|
@ -2320,7 +2323,7 @@ BOOL CBotIndexExpr::ExecuteVar(CBotVar* &pVar, CBotStack* &pile, CBotToken* prev
|
||||||
// DEBUG( "CBotIndexExpr::ExecuteVar", -1 , pj);
|
// DEBUG( "CBotIndexExpr::ExecuteVar", -1 , pj);
|
||||||
|
|
||||||
if ( pVar->GivType(1) != CBotTypArrayPointer )
|
if ( pVar->GivType(1) != CBotTypArrayPointer )
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
|
|
||||||
pile = pile->AddStack();
|
pile = pile->AddStack();
|
||||||
// if ( pile == EOX ) return TRUE;
|
// if ( pile == EOX ) return TRUE;
|
||||||
|
@ -2406,7 +2409,7 @@ void CBotFieldExpr::SetUniqNum(int num)
|
||||||
BOOL CBotFieldExpr::ExecuteVar(CBotVar* &pVar, CBotCStack* &pile)
|
BOOL CBotFieldExpr::ExecuteVar(CBotVar* &pVar, CBotCStack* &pile)
|
||||||
{
|
{
|
||||||
if ( pVar->GivType(1) != CBotTypPointer )
|
if ( pVar->GivType(1) != CBotTypPointer )
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
|
|
||||||
// pVar = pVar->GivItem(m_token.GivString());
|
// pVar = pVar->GivItem(m_token.GivString());
|
||||||
pVar = pVar->GivItemRef(m_nIdent);
|
pVar = pVar->GivItemRef(m_nIdent);
|
||||||
|
@ -2433,7 +2436,7 @@ BOOL CBotFieldExpr::ExecuteVar(CBotVar* &pVar, CBotStack* &pile, CBotToken* prev
|
||||||
// DEBUG( "CBotFieldExpre::ExecuteVar "+m_token.GivString(), 0, pj );
|
// DEBUG( "CBotFieldExpre::ExecuteVar "+m_token.GivString(), 0, pj );
|
||||||
|
|
||||||
if ( pVar->GivType(1) != CBotTypPointer )
|
if ( pVar->GivType(1) != CBotTypPointer )
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
|
|
||||||
CBotVarClass* pItem = pVar->GivPointer();
|
CBotVarClass* pItem = pVar->GivPointer();
|
||||||
if ( pItem == NULL )
|
if ( pItem == NULL )
|
||||||
|
@ -2693,7 +2696,7 @@ BOOL CBotLeftExpr::ExecuteVar(CBotVar* &pVar, CBotStack* &pile, CBotToken* prevT
|
||||||
if ( pVar == NULL )
|
if ( pVar == NULL )
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
#endif
|
#endif
|
||||||
pile->SetError(2, &m_token);
|
pile->SetError(2, &m_token);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -3346,7 +3349,7 @@ BOOL CBotExprVar::ExecuteVar(CBotVar* &pVar, CBotStack* &pj, CBotToken* prevToke
|
||||||
if ( pVar == NULL )
|
if ( pVar == NULL )
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
#endif
|
#endif
|
||||||
pj->SetError(1, &m_token);
|
pj->SetError(1, &m_token);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -3969,7 +3972,7 @@ BOOL TypeCompatible( CBotTypResult& type1, CBotTypResult& type2, int op )
|
||||||
|
|
||||||
// regarde si deux variables sont compatible pour un passage de paramètre
|
// regarde si deux variables sont compatible pour un passage de paramètre
|
||||||
|
|
||||||
BOOL TypesCompatibles( CBotTypResult& type1, CBotTypResult& type2 )
|
BOOL TypesCompatibles( const CBotTypResult& type1, const CBotTypResult& type2 )
|
||||||
{
|
{
|
||||||
int t1 = type1.GivType();
|
int t1 = type1.GivType();
|
||||||
int t2 = type2.GivType();
|
int t2 = type2.GivType();
|
||||||
|
|
|
@ -30,6 +30,14 @@
|
||||||
|
|
||||||
#define EOX (CBotStack*)-1 // marqueur condition spéciale
|
#define EOX (CBotStack*)-1 // marqueur condition spéciale
|
||||||
|
|
||||||
|
|
||||||
|
// fix for MSVC instruction __asm int 3 (setting a trap)
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
#define ASM_TRAP() asm("int $3");
|
||||||
|
#else
|
||||||
|
#define ASM_TRAP() __asm int 3;
|
||||||
|
#endif
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
// résumé des classes utilisées, définies ci-après
|
// résumé des classes utilisées, définies ci-après
|
||||||
|
|
||||||
|
@ -372,7 +380,7 @@ public:
|
||||||
static
|
static
|
||||||
void DecLvl();
|
void DecLvl();
|
||||||
static
|
static
|
||||||
BOOL ChkLvl(CBotString& label, int type);
|
BOOL ChkLvl(const CBotString& label, int type);
|
||||||
|
|
||||||
BOOL IsOfClass(CBotString name);
|
BOOL IsOfClass(CBotString name);
|
||||||
};
|
};
|
||||||
|
@ -1194,7 +1202,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
// classe pour la gestion des nombres réels (float)
|
// classe pour la gestion des nombres réels (float)
|
||||||
class CBotVarFloat : CBotVar
|
class CBotVarFloat : public CBotVar
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
float m_val; // la valeur
|
float m_val; // la valeur
|
||||||
|
@ -1235,7 +1243,7 @@ public:
|
||||||
|
|
||||||
|
|
||||||
// classe pour la gestion des chaînes (String)
|
// classe pour la gestion des chaînes (String)
|
||||||
class CBotVarString : CBotVar
|
class CBotVarString : public CBotVar
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CBotString m_val; // la valeur
|
CBotString m_val; // la valeur
|
||||||
|
@ -1262,7 +1270,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
// classe pour la gestion des boolean
|
// classe pour la gestion des boolean
|
||||||
class CBotVarBoolean : CBotVar
|
class CBotVarBoolean : public CBotVar
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
BOOL m_val; // la valeur
|
BOOL m_val; // la valeur
|
||||||
|
@ -1310,7 +1318,7 @@ private:
|
||||||
BOOL m_bConstructor; // set si un constructeur a été appelé
|
BOOL m_bConstructor; // set si un constructeur a été appelé
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CBotVarClass( const CBotToken* name, CBotTypResult& type );
|
CBotVarClass( const CBotToken* name, const CBotTypResult& type );
|
||||||
// CBotVarClass( const CBotToken* name, CBotTypResult& type, int &nIdent );
|
// CBotVarClass( const CBotToken* name, CBotTypResult& type, int &nIdent );
|
||||||
~CBotVarClass();
|
~CBotVarClass();
|
||||||
// void InitCBotVarClass( const CBotToken* name, CBotTypResult& type, int &nIdent );
|
// void InitCBotVarClass( const CBotToken* name, CBotTypResult& type, int &nIdent );
|
||||||
|
@ -1424,7 +1432,7 @@ public:
|
||||||
extern CBotInstr* CompileParams(CBotToken* &p, CBotCStack* pStack, CBotVar** ppVars);
|
extern CBotInstr* CompileParams(CBotToken* &p, CBotCStack* pStack, CBotVar** ppVars);
|
||||||
|
|
||||||
extern BOOL TypeCompatible( CBotTypResult& type1, CBotTypResult& type2, int op = 0 );
|
extern BOOL TypeCompatible( CBotTypResult& type1, CBotTypResult& type2, int op = 0 );
|
||||||
extern BOOL TypesCompatibles( CBotTypResult& type1, CBotTypResult& type2 );
|
extern BOOL TypesCompatibles( const CBotTypResult& type1, const CBotTypResult& type2 );
|
||||||
|
|
||||||
extern BOOL WriteWord(FILE* pf, WORD w);
|
extern BOOL WriteWord(FILE* pf, WORD w);
|
||||||
extern BOOL ReadWord(FILE* pf, WORD& w);
|
extern BOOL ReadWord(FILE* pf, WORD& w);
|
||||||
|
@ -1439,7 +1447,7 @@ extern BOOL ReadType(FILE* pf, CBotTypResult& type);
|
||||||
|
|
||||||
extern float GivNumFloat( const char* p );
|
extern float GivNumFloat( const char* p );
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#if FALSE
|
||||||
extern void DEBUG( const char* text, int val, CBotStack* pile );
|
extern void DEBUG( const char* text, int val, CBotStack* pile );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ class CBotVarPointer; // pointeur
|
||||||
class CBotCall; // les fonctions
|
class CBotCall; // les fonctions
|
||||||
class CBotCallMethode; // les méthodes
|
class CBotCallMethode; // les méthodes
|
||||||
class CBotDefParam; // liste de paramètres
|
class CBotDefParam; // liste de paramètres
|
||||||
|
class CBotCStack;
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -106,7 +107,7 @@ public:
|
||||||
// pour les tableaux de variables
|
// pour les tableaux de variables
|
||||||
|
|
||||||
DllExport
|
DllExport
|
||||||
CBotTypResult(CBotTypResult& typ);
|
CBotTypResult(const CBotTypResult& typ);
|
||||||
// pour les assignations
|
// pour les assignations
|
||||||
DllExport
|
DllExport
|
||||||
CBotTypResult();
|
CBotTypResult();
|
||||||
|
@ -115,18 +116,18 @@ public:
|
||||||
~CBotTypResult();
|
~CBotTypResult();
|
||||||
|
|
||||||
DllExport
|
DllExport
|
||||||
int GivType(int mode = 0);
|
int GivType(int mode = 0) const;
|
||||||
// rend le type CBotTyp* du résultat
|
// rend le type CBotTyp* du résultat
|
||||||
|
|
||||||
void SetType(int n);
|
void SetType(int n);
|
||||||
// modifie le type
|
// modifie le type
|
||||||
|
|
||||||
DllExport
|
DllExport
|
||||||
CBotClass* GivClass();
|
CBotClass* GivClass() const;
|
||||||
// rend le pointeur à la classe (pour les CBotTypClass, CBotTypPointer)
|
// rend le pointeur à la classe (pour les CBotTypClass, CBotTypPointer)
|
||||||
|
|
||||||
DllExport
|
DllExport
|
||||||
int GivLimite();
|
int GivLimite() const;
|
||||||
// rend la taille limite du tableau (CBotTypArray)
|
// rend la taille limite du tableau (CBotTypArray)
|
||||||
|
|
||||||
DllExport
|
DllExport
|
||||||
|
@ -137,14 +138,14 @@ public:
|
||||||
// idem avec une liste de dimension (tableaux de tableaux)
|
// idem avec une liste de dimension (tableaux de tableaux)
|
||||||
|
|
||||||
DllExport
|
DllExport
|
||||||
CBotTypResult& GivTypElem();
|
CBotTypResult& GivTypElem() const;
|
||||||
// rend le type des éléments du tableau (CBotTypArray)
|
// rend le type des éléments du tableau (CBotTypArray)
|
||||||
|
|
||||||
DllExport
|
DllExport
|
||||||
BOOL Compare(CBotTypResult& typ);
|
BOOL Compare(const CBotTypResult& typ) const;
|
||||||
// compare si les types sont compatibles
|
// compare si les types sont compatibles
|
||||||
DllExport
|
DllExport
|
||||||
BOOL Eq(int type);
|
BOOL Eq(int type) const;
|
||||||
// compare le type
|
// compare le type
|
||||||
|
|
||||||
DllExport
|
DllExport
|
||||||
|
@ -274,7 +275,7 @@ public:
|
||||||
DllExport
|
DllExport
|
||||||
void Empty();
|
void Empty();
|
||||||
DllExport
|
DllExport
|
||||||
BOOL IsEmpty();
|
BOOL IsEmpty() const;
|
||||||
DllExport
|
DllExport
|
||||||
int GivLength();
|
int GivLength();
|
||||||
DllExport
|
DllExport
|
||||||
|
@ -1048,7 +1049,7 @@ private:
|
||||||
public:
|
public:
|
||||||
CBotToken();
|
CBotToken();
|
||||||
CBotToken(const CBotToken* pSrc);
|
CBotToken(const CBotToken* pSrc);
|
||||||
CBotToken(CBotString& mot, CBotString& sep, int start=0, int end=0);
|
CBotToken(const CBotString& mot, const CBotString& sep, int start=0, int end=0);
|
||||||
CBotToken(const char* mot, const char* sep = NULL);
|
CBotToken(const char* mot, const char* sep = NULL);
|
||||||
// constructeur
|
// constructeur
|
||||||
~CBotToken(); // destructeur
|
~CBotToken(); // destructeur
|
||||||
|
|
|
@ -1042,7 +1042,7 @@ BOOL CBotDefParam::Execute(CBotVar** ppVars, CBotStack* &pj)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newvar->SetUniqNum(p->m_nIdent);
|
newvar->SetUniqNum(p->m_nIdent);
|
||||||
|
|
|
@ -53,7 +53,8 @@ CBotStack* CBotStack::FirstStack()
|
||||||
|
|
||||||
CBotStack* pp = p;
|
CBotStack* pp = p;
|
||||||
pp += MAXSTACK;
|
pp += MAXSTACK;
|
||||||
for ( int i = 0 ; i< 10 ; i++ )
|
int i;
|
||||||
|
for ( i = 0 ; i< 10 ; i++ )
|
||||||
{
|
{
|
||||||
pp->m_bOver = TRUE;
|
pp->m_bOver = TRUE;
|
||||||
pp ++;
|
pp ++;
|
||||||
|
@ -75,12 +76,12 @@ CBotStack* CBotStack::FirstStack()
|
||||||
CBotStack::CBotStack(CBotStack* ppapa)
|
CBotStack::CBotStack(CBotStack* ppapa)
|
||||||
{
|
{
|
||||||
// constructeur doit exister, sinon le destructeur n'est jamais appelé !
|
// constructeur doit exister, sinon le destructeur n'est jamais appelé !
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
CBotStack::~CBotStack()
|
CBotStack::~CBotStack()
|
||||||
{
|
{
|
||||||
__asm int 3; // utiliser Delete() à la place
|
ASM_TRAP(); // utiliser Delete() à la place
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBotStack::Delete()
|
void CBotStack::Delete()
|
||||||
|
@ -696,7 +697,7 @@ void CBotStack::AddVar(CBotVar* pVar)
|
||||||
*pp = pVar; // ajoute à la suite
|
*pp = pVar; // ajoute à la suite
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
if ( pVar->GivUniqNum() == 0 ) __asm int 3;
|
if ( pVar->GivUniqNum() == 0 ) ASM_TRAP();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1094,7 +1095,7 @@ BOOL CBotVar::RestoreState(FILE* pf, CBotVar* &pVar)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( pPrev != NULL ) pPrev->m_next = pNew;
|
if ( pPrev != NULL ) pPrev->m_next = pNew;
|
||||||
|
@ -1391,7 +1392,7 @@ void CBotCStack::AddVar(CBotVar* pVar)
|
||||||
*pp = pVar; // ajoute à la suite
|
*pp = pVar; // ajoute à la suite
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
if ( pVar->GivUniqNum() == 0 ) __asm int 3;
|
if ( pVar->GivUniqNum() == 0 ) ASM_TRAP();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,8 @@ CBotString CBotString::Right(int nCount) const
|
||||||
int i = m_lg - nCount;
|
int i = m_lg - nCount;
|
||||||
if ( i < 0 ) i = 0;
|
if ( i < 0 ) i = 0;
|
||||||
|
|
||||||
for ( int j = 0; i < m_lg && i < 1999; i++)
|
int j;
|
||||||
|
for ( j = 0 ; i < m_lg && i < 1999; i++)
|
||||||
{
|
{
|
||||||
chaine[j++] = m_ptr[i];
|
chaine[j++] = m_ptr[i];
|
||||||
}
|
}
|
||||||
|
@ -410,7 +411,7 @@ BOOL CBotString::operator<=(const char* p)
|
||||||
return Compare(p) <= 0;
|
return Compare(p) <= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CBotString::IsEmpty()
|
BOOL CBotString::IsEmpty() const
|
||||||
{
|
{
|
||||||
return (m_lg == 0);
|
return (m_lg == 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ CBotToken::CBotToken(const CBotToken* pSrc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CBotToken::CBotToken(CBotString& mot, CBotString& sep, int start, int end)
|
CBotToken::CBotToken(const CBotString& mot, const CBotString& sep, int start, int end)
|
||||||
{
|
{
|
||||||
m_Text = mot; // mot trouvé comme token
|
m_Text = mot; // mot trouvé comme token
|
||||||
m_Sep = sep; // séparateurs qui suivent
|
m_Sep = sep; // séparateurs qui suivent
|
||||||
|
|
|
@ -464,7 +464,7 @@ BOOL CBotTwoOpExpr::Execute(CBotStack* &pStack)
|
||||||
if ( !IsNan(left, right, &err) ) result->SL(left , right);
|
if ( !IsNan(left, right, &err) ) result->SL(left , right);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
delete temp;
|
delete temp;
|
||||||
|
|
||||||
|
@ -563,4 +563,4 @@ void t(BOOL t)
|
||||||
x = 1 + t ? 1 : 3 + 4 * 2 ;
|
x = 1 + t ? 1 : 3 + 4 * 2 ;
|
||||||
t ? 0 : "test";
|
t ? 0 : "test";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -105,7 +105,7 @@ CBotVarBoolean::CBotVarBoolean( const CBotToken* name )
|
||||||
|
|
||||||
CBotVarClass* CBotVarClass::m_ExClass = NULL;
|
CBotVarClass* CBotVarClass::m_ExClass = NULL;
|
||||||
|
|
||||||
CBotVarClass::CBotVarClass( const CBotToken* name, CBotTypResult& type)
|
CBotVarClass::CBotVarClass( const CBotToken* name, const CBotTypResult& type)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
// int nIdent = 0;
|
// int nIdent = 0;
|
||||||
|
@ -123,7 +123,7 @@ void CBotVarClass::InitCBotVarClass( const CBotToken* name, CBotTypResult& type
|
||||||
!type.Eq(CBotTypIntrinsic) && // par comodité accepte ces types
|
!type.Eq(CBotTypIntrinsic) && // par comodité accepte ces types
|
||||||
!type.Eq(CBotTypPointer) &&
|
!type.Eq(CBotTypPointer) &&
|
||||||
!type.Eq(CBotTypArrayPointer) &&
|
!type.Eq(CBotTypArrayPointer) &&
|
||||||
!type.Eq(CBotTypArrayBody)) __asm int 3;
|
!type.Eq(CBotTypArrayBody)) ASM_TRAP();
|
||||||
|
|
||||||
m_token = new CBotToken(name);
|
m_token = new CBotToken(name);
|
||||||
m_next = NULL;
|
m_next = NULL;
|
||||||
|
@ -167,7 +167,7 @@ void CBotVarClass::InitCBotVarClass( const CBotToken* name, CBotTypResult& type
|
||||||
CBotVarClass::~CBotVarClass( )
|
CBotVarClass::~CBotVarClass( )
|
||||||
{
|
{
|
||||||
if ( m_CptUse != 0 )
|
if ( m_CptUse != 0 )
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
|
|
||||||
if ( m_pParent ) delete m_pParent;
|
if ( m_pParent ) delete m_pParent;
|
||||||
m_pParent = NULL;
|
m_pParent = NULL;
|
||||||
|
@ -240,7 +240,7 @@ void CBotVar::SetUniqNum(long n)
|
||||||
{
|
{
|
||||||
m_ident = n;
|
m_ident = n;
|
||||||
|
|
||||||
if ( n == 0 ) __asm int 3;
|
if ( n == 0 ) ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
long CBotVar::NextUniqNum()
|
long CBotVar::NextUniqNum()
|
||||||
|
@ -265,7 +265,7 @@ BOOL CBotVar::Save1State(FILE* pf)
|
||||||
// cette routine "virtual" ne doit jamais être appellée,
|
// cette routine "virtual" ne doit jamais être appellée,
|
||||||
// il doit y avoir une routine pour chaque classe fille (CBotVarInt, CBotVarFloat, etc)
|
// il doit y avoir une routine pour chaque classe fille (CBotVarInt, CBotVarFloat, etc)
|
||||||
// ( voir le type dans m_type )
|
// ( voir le type dans m_type )
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -333,7 +333,7 @@ CBotVar* CBotVar::Create(const CBotToken* name, CBotTypResult type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -404,7 +404,7 @@ CBotVar* CBotVar::Create( const char* n, CBotTypResult type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -517,25 +517,25 @@ CBotToken* CBotVar::GivToken()
|
||||||
|
|
||||||
CBotVar* CBotVar::GivItem(const char* name)
|
CBotVar* CBotVar::GivItem(const char* name)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
CBotVar* CBotVar::GivItemRef(int nIdent)
|
CBotVar* CBotVar::GivItemRef(int nIdent)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
CBotVar* CBotVar::GivItemList()
|
CBotVar* CBotVar::GivItemList()
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
CBotVar* CBotVar::GivItem(int row, BOOL bGrow)
|
CBotVar* CBotVar::GivItem(int row, BOOL bGrow)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -615,7 +615,7 @@ void CBotVar::SetVal(CBotVar* var)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_binit = var->m_binit; // copie l'état nan s'il y a
|
m_binit = var->m_binit; // copie l'état nan s'il y a
|
||||||
|
@ -649,12 +649,12 @@ int CBotVar::GivPrivate()
|
||||||
|
|
||||||
void CBotVar::SetPointer(CBotVar* pVarClass)
|
void CBotVar::SetPointer(CBotVar* pVarClass)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
CBotVarClass* CBotVar::GivPointer()
|
CBotVarClass* CBotVar::GivPointer()
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -663,167 +663,167 @@ CBotVarClass* CBotVar::GivPointer()
|
||||||
|
|
||||||
int CBotVar::GivValInt()
|
int CBotVar::GivValInt()
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
float CBotVar::GivValFloat()
|
float CBotVar::GivValFloat()
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBotVar::SetValInt(int c, const char* s)
|
void CBotVar::SetValInt(int c, const char* s)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBotVar::SetValFloat(float c)
|
void CBotVar::SetValFloat(float c)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBotVar::Mul(CBotVar* left, CBotVar* right)
|
void CBotVar::Mul(CBotVar* left, CBotVar* right)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBotVar::Power(CBotVar* left, CBotVar* right)
|
void CBotVar::Power(CBotVar* left, CBotVar* right)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
int CBotVar::Div(CBotVar* left, CBotVar* right)
|
int CBotVar::Div(CBotVar* left, CBotVar* right)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CBotVar::Modulo(CBotVar* left, CBotVar* right)
|
int CBotVar::Modulo(CBotVar* left, CBotVar* right)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBotVar::Add(CBotVar* left, CBotVar* right)
|
void CBotVar::Add(CBotVar* left, CBotVar* right)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBotVar::Sub(CBotVar* left, CBotVar* right)
|
void CBotVar::Sub(CBotVar* left, CBotVar* right)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CBotVar::Lo(CBotVar* left, CBotVar* right)
|
BOOL CBotVar::Lo(CBotVar* left, CBotVar* right)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CBotVar::Hi(CBotVar* left, CBotVar* right)
|
BOOL CBotVar::Hi(CBotVar* left, CBotVar* right)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CBotVar::Ls(CBotVar* left, CBotVar* right)
|
BOOL CBotVar::Ls(CBotVar* left, CBotVar* right)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CBotVar::Hs(CBotVar* left, CBotVar* right)
|
BOOL CBotVar::Hs(CBotVar* left, CBotVar* right)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CBotVar::Eq(CBotVar* left, CBotVar* right)
|
BOOL CBotVar::Eq(CBotVar* left, CBotVar* right)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CBotVar::Ne(CBotVar* left, CBotVar* right)
|
BOOL CBotVar::Ne(CBotVar* left, CBotVar* right)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBotVar::And(CBotVar* left, CBotVar* right)
|
void CBotVar::And(CBotVar* left, CBotVar* right)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBotVar::Or(CBotVar* left, CBotVar* right)
|
void CBotVar::Or(CBotVar* left, CBotVar* right)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBotVar::XOr(CBotVar* left, CBotVar* right)
|
void CBotVar::XOr(CBotVar* left, CBotVar* right)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBotVar::ASR(CBotVar* left, CBotVar* right)
|
void CBotVar::ASR(CBotVar* left, CBotVar* right)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBotVar::SR(CBotVar* left, CBotVar* right)
|
void CBotVar::SR(CBotVar* left, CBotVar* right)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBotVar::SL(CBotVar* left, CBotVar* right)
|
void CBotVar::SL(CBotVar* left, CBotVar* right)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBotVar::Neg()
|
void CBotVar::Neg()
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBotVar::Not()
|
void CBotVar::Not()
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBotVar::Inc()
|
void CBotVar::Inc()
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
void CBotVar::Dec()
|
void CBotVar::Dec()
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBotVar::Copy(CBotVar* pSrc, BOOL bName)
|
void CBotVar::Copy(CBotVar* pSrc, BOOL bName)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBotVar::SetValString(const char* p)
|
void CBotVar::SetValString(const char* p)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
CBotString CBotVar::GivValString()
|
CBotString CBotVar::GivValString()
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
return CBotString();
|
return CBotString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBotVar::SetClass(CBotClass* pClass)
|
void CBotVar::SetClass(CBotClass* pClass)
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
}
|
}
|
||||||
|
|
||||||
CBotClass* CBotVar::GivClass()
|
CBotClass* CBotVar::GivClass()
|
||||||
{
|
{
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -915,7 +915,7 @@ void CBotVarInt::Mul(CBotVar* left, CBotVar* right)
|
||||||
|
|
||||||
void CBotVarInt::Power(CBotVar* left, CBotVar* right)
|
void CBotVarInt::Power(CBotVar* left, CBotVar* right)
|
||||||
{
|
{
|
||||||
m_val = (int) pow( left->GivValInt() , right->GivValInt() );
|
m_val = (int) pow( (double) left->GivValInt() , (double) right->GivValInt() );
|
||||||
m_binit = TRUE;
|
m_binit = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1396,7 +1396,7 @@ void CBotVarClass::Copy(CBotVar* pSrc, BOOL bName)
|
||||||
pSrc = pSrc->GivPointer(); // si source donné par un pointeur
|
pSrc = pSrc->GivPointer(); // si source donné par un pointeur
|
||||||
|
|
||||||
if ( pSrc->GivType() != CBotTypClass )
|
if ( pSrc->GivType() != CBotTypClass )
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
|
|
||||||
CBotVarClass* p = (CBotVarClass*)pSrc;
|
CBotVarClass* p = (CBotVarClass*)pSrc;
|
||||||
|
|
||||||
|
@ -1408,7 +1408,7 @@ void CBotVarClass::Copy(CBotVar* pSrc, BOOL bName)
|
||||||
m_pClass = p->m_pClass;
|
m_pClass = p->m_pClass;
|
||||||
if ( p->m_pParent )
|
if ( p->m_pParent )
|
||||||
{
|
{
|
||||||
__asm int 3; "que faire du pParent";
|
ASM_TRAP(); "que faire du pParent";
|
||||||
}
|
}
|
||||||
|
|
||||||
// m_next = NULL;
|
// m_next = NULL;
|
||||||
|
@ -1613,7 +1613,7 @@ CBotString CBotVarClass::GivValString()
|
||||||
|
|
||||||
if ( m_pClass != NULL ) // pas utilisé pour un array
|
if ( m_pClass != NULL ) // pas utilisé pour un array
|
||||||
{
|
{
|
||||||
res = m_pClass->GivName() + "( ";
|
res = m_pClass->GivName() + CBotString("( ");
|
||||||
|
|
||||||
CBotVarClass* my = this;
|
CBotVarClass* my = this;
|
||||||
while ( my != NULL )
|
while ( my != NULL )
|
||||||
|
@ -1621,7 +1621,7 @@ CBotString CBotVarClass::GivValString()
|
||||||
CBotVar* pv = my->m_pVar;
|
CBotVar* pv = my->m_pVar;
|
||||||
while ( pv != NULL )
|
while ( pv != NULL )
|
||||||
{
|
{
|
||||||
res += pv->GivName() + "=";
|
res += pv->GivName() + CBotString("=");
|
||||||
|
|
||||||
if ( pv->IsStatic() )
|
if ( pv->IsStatic() )
|
||||||
{
|
{
|
||||||
|
@ -1766,7 +1766,7 @@ BOOL CBotVarClass::Ne(CBotVar* left, CBotVar* right)
|
||||||
CBotVarArray::CBotVarArray(const CBotToken* name, CBotTypResult& type )
|
CBotVarArray::CBotVarArray(const CBotToken* name, CBotTypResult& type )
|
||||||
{
|
{
|
||||||
if ( !type.Eq(CBotTypArrayPointer) &&
|
if ( !type.Eq(CBotTypArrayPointer) &&
|
||||||
!type.Eq(CBotTypArrayBody)) __asm int 3;
|
!type.Eq(CBotTypArrayBody)) ASM_TRAP();
|
||||||
|
|
||||||
m_token = new CBotToken(name);
|
m_token = new CBotToken(name);
|
||||||
m_next = NULL;
|
m_next = NULL;
|
||||||
|
@ -1789,7 +1789,7 @@ CBotVarArray::~CBotVarArray()
|
||||||
void CBotVarArray::Copy(CBotVar* pSrc, BOOL bName)
|
void CBotVarArray::Copy(CBotVar* pSrc, BOOL bName)
|
||||||
{
|
{
|
||||||
if ( pSrc->GivType() != CBotTypArrayPointer )
|
if ( pSrc->GivType() != CBotTypArrayPointer )
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
|
|
||||||
CBotVarArray* p = (CBotVarArray*)pSrc;
|
CBotVarArray* p = (CBotVarArray*)pSrc;
|
||||||
|
|
||||||
|
@ -1823,7 +1823,7 @@ void CBotVarArray::SetPointer(CBotVar* pVarClass)
|
||||||
|
|
||||||
if ( !pVarClass->m_type.Eq(CBotTypClass) &&
|
if ( !pVarClass->m_type.Eq(CBotTypClass) &&
|
||||||
!pVarClass->m_type.Eq(CBotTypArrayBody))
|
!pVarClass->m_type.Eq(CBotTypArrayBody))
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
|
|
||||||
((CBotVarClass*)pVarClass)->IncrementUse(); // une référence en plus
|
((CBotVarClass*)pVarClass)->IncrementUse(); // une référence en plus
|
||||||
}
|
}
|
||||||
|
@ -1879,7 +1879,7 @@ CBotVarPointer::CBotVarPointer(const CBotToken* name, CBotTypResult& type )
|
||||||
if ( !type.Eq(CBotTypPointer) &&
|
if ( !type.Eq(CBotTypPointer) &&
|
||||||
!type.Eq(CBotTypNullPointer) &&
|
!type.Eq(CBotTypNullPointer) &&
|
||||||
!type.Eq(CBotTypClass) && // par commodité accepte Class et Intrinsic
|
!type.Eq(CBotTypClass) && // par commodité accepte Class et Intrinsic
|
||||||
!type.Eq(CBotTypIntrinsic) ) __asm int 3;
|
!type.Eq(CBotTypIntrinsic) ) ASM_TRAP();
|
||||||
|
|
||||||
m_token = new CBotToken(name);
|
m_token = new CBotToken(name);
|
||||||
m_next = NULL;
|
m_next = NULL;
|
||||||
|
@ -1962,7 +1962,7 @@ void CBotVarPointer::SetPointer(CBotVar* pVarClass)
|
||||||
|
|
||||||
// if ( pVarClass->GivType() != CBotTypClass )
|
// if ( pVarClass->GivType() != CBotTypClass )
|
||||||
if ( !pVarClass->m_type.Eq(CBotTypClass) )
|
if ( !pVarClass->m_type.Eq(CBotTypClass) )
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
|
|
||||||
((CBotVarClass*)pVarClass)->IncrementUse(); // une référence en plus
|
((CBotVarClass*)pVarClass)->IncrementUse(); // une référence en plus
|
||||||
m_pClass = ((CBotVarClass*)pVarClass)->m_pClass;
|
m_pClass = ((CBotVarClass*)pVarClass)->m_pClass;
|
||||||
|
@ -2031,7 +2031,7 @@ void CBotVarPointer::Copy(CBotVar* pSrc, BOOL bName)
|
||||||
{
|
{
|
||||||
if ( pSrc->GivType() != CBotTypPointer &&
|
if ( pSrc->GivType() != CBotTypPointer &&
|
||||||
pSrc->GivType() != CBotTypNullPointer)
|
pSrc->GivType() != CBotTypNullPointer)
|
||||||
__asm int 3;
|
ASM_TRAP();
|
||||||
|
|
||||||
CBotVarPointer* p = (CBotVarPointer*)pSrc;
|
CBotVarPointer* p = (CBotVarPointer*)pSrc;
|
||||||
|
|
||||||
|
@ -2128,7 +2128,7 @@ CBotTypResult::CBotTypResult(int type, CBotTypResult elem)
|
||||||
m_pNext = new CBotTypResult( elem );
|
m_pNext = new CBotTypResult( elem );
|
||||||
}
|
}
|
||||||
|
|
||||||
CBotTypResult::CBotTypResult(CBotTypResult& typ)
|
CBotTypResult::CBotTypResult(const CBotTypResult& typ)
|
||||||
{
|
{
|
||||||
m_type = typ.m_type;
|
m_type = typ.m_type;
|
||||||
m_pClass = typ.m_pClass;
|
m_pClass = typ.m_pClass;
|
||||||
|
@ -2152,18 +2152,18 @@ CBotTypResult::~CBotTypResult()
|
||||||
delete m_pNext;
|
delete m_pNext;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CBotTypResult::GivType(int mode)
|
int CBotTypResult::GivType(int mode) const
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
if ( m_type == CBotTypPointer ||
|
if ( m_type == CBotTypPointer ||
|
||||||
m_type == CBotTypClass ||
|
m_type == CBotTypClass ||
|
||||||
m_type == CBotTypIntrinsic )
|
m_type == CBotTypIntrinsic )
|
||||||
|
|
||||||
if ( m_pClass == NULL ) __asm int 3;
|
if ( m_pClass == NULL ) ASM_TRAP();
|
||||||
|
|
||||||
|
|
||||||
if ( m_type == CBotTypArrayPointer )
|
if ( m_type == CBotTypArrayPointer )
|
||||||
if ( m_pNext == NULL ) __asm int 3;
|
if ( m_pNext == NULL ) ASM_TRAP();
|
||||||
#endif
|
#endif
|
||||||
if ( mode == 3 && m_type == CBotTypNullPointer ) return CBotTypPointer;
|
if ( mode == 3 && m_type == CBotTypNullPointer ) return CBotTypPointer;
|
||||||
return m_type;
|
return m_type;
|
||||||
|
@ -2174,17 +2174,17 @@ void CBotTypResult::SetType(int n)
|
||||||
m_type = n;
|
m_type = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
CBotClass* CBotTypResult::GivClass()
|
CBotClass* CBotTypResult::GivClass() const
|
||||||
{
|
{
|
||||||
return m_pClass;
|
return m_pClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
CBotTypResult& CBotTypResult::GivTypElem()
|
CBotTypResult& CBotTypResult::GivTypElem() const
|
||||||
{
|
{
|
||||||
return *m_pNext;
|
return *m_pNext;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CBotTypResult::GivLimite()
|
int CBotTypResult::GivLimite() const
|
||||||
{
|
{
|
||||||
return m_limite;
|
return m_limite;
|
||||||
}
|
}
|
||||||
|
@ -2207,7 +2207,7 @@ void CBotTypResult::SetArray( int* max )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BOOL CBotTypResult::Compare(CBotTypResult& typ)
|
BOOL CBotTypResult::Compare(const CBotTypResult& typ) const
|
||||||
{
|
{
|
||||||
if ( m_type != typ.m_type ) return FALSE;
|
if ( m_type != typ.m_type ) return FALSE;
|
||||||
|
|
||||||
|
@ -2223,7 +2223,7 @@ BOOL CBotTypResult::Compare(CBotTypResult& typ)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CBotTypResult::Eq(int type)
|
BOOL CBotTypResult::Eq(int type) const
|
||||||
{
|
{
|
||||||
return m_type == type;
|
return m_type == type;
|
||||||
}
|
}
|
||||||
|
|
|
@ -292,7 +292,7 @@ BOOL rfwrite (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
|
||||||
|
|
||||||
FILE* pFile= (FILE*)pVar->GivValInt();
|
FILE* pFile= (FILE*)pVar->GivValInt();
|
||||||
|
|
||||||
int res = fputs(param+"\n", pFile);
|
int res = fputs(param+CBotString("\n"), pFile);
|
||||||
|
|
||||||
// en cas d'erreur génère une exception
|
// en cas d'erreur génère une exception
|
||||||
if ( res < 0 ) { Exception = CBotErrWrite; return FALSE; }
|
if ( res < 0 ) { Exception = CBotErrWrite; return FALSE; }
|
||||||
|
|
|
@ -12,7 +12,9 @@
|
||||||
// * GNU General Public License for more details.
|
// * GNU General Public License for more details.
|
||||||
// *
|
// *
|
||||||
// * You should have received a copy of the GNU General Public License
|
// * You should have received a copy of the GNU General Public License
|
||||||
// * along with this program. If not, see http://www.gnu.org/licenses/.// CBotConsoleDlg.cpp : implementation file
|
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||||
|
|
||||||
|
// CBotConsoleDlg.cpp : implementation file
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
@ -208,7 +210,7 @@ BOOL CBotConsoleDlg::OnInitDialog()
|
||||||
m_Edit1.ReplaceSel("Les fonctions suivantes sont disponibles:\r\n");
|
m_Edit1.ReplaceSel("Les fonctions suivantes sont disponibles:\r\n");
|
||||||
for ( int i = 0; i < m_pListe->GivSize(); i++ )
|
for ( int i = 0; i < m_pListe->GivSize(); i++ )
|
||||||
{
|
{
|
||||||
CBotString x = (*m_pListe)[i] + "\r\n";
|
CBotString x = (*m_pListe)[i] + CBotString("\r\n");
|
||||||
m_Edit1.ReplaceSel(x);
|
m_Edit1.ReplaceSel(x);
|
||||||
}
|
}
|
||||||
m_Edit1.ReplaceSel("Entrez une commande ci-dessous.\r\n\r\n");
|
m_Edit1.ReplaceSel("Entrez une commande ci-dessous.\r\n\r\n");
|
||||||
|
|
|
@ -12,7 +12,9 @@
|
||||||
// * GNU General Public License for more details.
|
// * GNU General Public License for more details.
|
||||||
// *
|
// *
|
||||||
// * You should have received a copy of the GNU General Public License
|
// * You should have received a copy of the GNU General Public License
|
||||||
// * along with this program. If not, see http://www.gnu.org/licenses/.#if !defined(AFX_BOTCONSOLEDLG_H__A11450A2_8E09_11D4_A439_00D059085115__INCLUDED_)
|
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||||
|
|
||||||
|
#if !defined(AFX_BOTCONSOLEDLG_H__A11450A2_8E09_11D4_A439_00D059085115__INCLUDED_)
|
||||||
#define AFX_BOTCONSOLEDLG_H__A11450A2_8E09_11D4_A439_00D059085115__INCLUDED_
|
#define AFX_BOTCONSOLEDLG_H__A11450A2_8E09_11D4_A439_00D059085115__INCLUDED_
|
||||||
|
|
||||||
#if _MSC_VER >= 1000
|
#if _MSC_VER >= 1000
|
||||||
|
|
|
@ -12,7 +12,9 @@
|
||||||
// * GNU General Public License for more details.
|
// * GNU General Public License for more details.
|
||||||
// *
|
// *
|
||||||
// * You should have received a copy of the GNU General Public License
|
// * You should have received a copy of the GNU General Public License
|
||||||
// * along with this program. If not, see http://www.gnu.org/licenses/.// ChildFrm.cpp : implementation of the CChildFrame class
|
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||||
|
|
||||||
|
// ChildFrm.cpp : implementation of the CChildFrame class
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
|
|
@ -12,7 +12,9 @@
|
||||||
// * GNU General Public License for more details.
|
// * GNU General Public License for more details.
|
||||||
// *
|
// *
|
||||||
// * You should have received a copy of the GNU General Public License
|
// * You should have received a copy of the GNU General Public License
|
||||||
// * along with this program. If not, see http://www.gnu.org/licenses/.// ChildFrm.h : interface of the CChildFrame class
|
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||||
|
|
||||||
|
// ChildFrm.h : interface of the CChildFrame class
|
||||||
//
|
//
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,9 @@
|
||||||
// * GNU General Public License for more details.
|
// * GNU General Public License for more details.
|
||||||
// *
|
// *
|
||||||
// * You should have received a copy of the GNU General Public License
|
// * You should have received a copy of the GNU General Public License
|
||||||
// * along with this program. If not, see http://www.gnu.org/licenses/.// MainFrm.cpp : implementation of the CMainFrame class
|
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||||
|
|
||||||
|
// MainFrm.cpp : implementation of the CMainFrame class
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
|
|
@ -12,7 +12,9 @@
|
||||||
// * GNU General Public License for more details.
|
// * GNU General Public License for more details.
|
||||||
// *
|
// *
|
||||||
// * You should have received a copy of the GNU General Public License
|
// * You should have received a copy of the GNU General Public License
|
||||||
// * along with this program. If not, see http://www.gnu.org/licenses/.// MainFrm.h : interface of the CMainFrame class
|
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||||
|
|
||||||
|
// MainFrm.h : interface of the CMainFrame class
|
||||||
//
|
//
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,9 @@
|
||||||
// * GNU General Public License for more details.
|
// * GNU General Public License for more details.
|
||||||
// *
|
// *
|
||||||
// * You should have received a copy of the GNU General Public License
|
// * You should have received a copy of the GNU General Public License
|
||||||
// * along with this program. If not, see http://www.gnu.org/licenses/.// PerformDlg.cpp : implementation file
|
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||||
|
|
||||||
|
// PerformDlg.cpp : implementation file
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
|
|
@ -12,7 +12,9 @@
|
||||||
// * GNU General Public License for more details.
|
// * GNU General Public License for more details.
|
||||||
// *
|
// *
|
||||||
// * You should have received a copy of the GNU General Public License
|
// * You should have received a copy of the GNU General Public License
|
||||||
// * along with this program. If not, see http://www.gnu.org/licenses/.#if !defined(AFX_PERFORMDLG_H__EAF2D560_97D8_11D4_A439_00D059085115__INCLUDED_)
|
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||||
|
|
||||||
|
#if !defined(AFX_PERFORMDLG_H__EAF2D560_97D8_11D4_A439_00D059085115__INCLUDED_)
|
||||||
#define AFX_PERFORMDLG_H__EAF2D560_97D8_11D4_A439_00D059085115__INCLUDED_
|
#define AFX_PERFORMDLG_H__EAF2D560_97D8_11D4_A439_00D059085115__INCLUDED_
|
||||||
|
|
||||||
#if _MSC_VER >= 1000
|
#if _MSC_VER >= 1000
|
||||||
|
|
|
@ -643,7 +643,7 @@ if ( mode == 2 ) if (!m_pProg->Compile(m_DocText, m_Liste, (void*) 44))
|
||||||
while ( pVar != NULL )
|
while ( pVar != NULL )
|
||||||
{
|
{
|
||||||
info += sep;
|
info += sep;
|
||||||
info += pVar->GivName() + " = " + pVar->GivValString();
|
info += pVar->GivName() + CBotString(" = ") + pVar->GivValString();
|
||||||
sep = ", ";
|
sep = ", ";
|
||||||
pVar = pVar->GivNext();
|
pVar = pVar->GivNext();
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,9 @@
|
||||||
// * GNU General Public License for more details.
|
// * GNU General Public License for more details.
|
||||||
// *
|
// *
|
||||||
// * You should have received a copy of the GNU General Public License
|
// * You should have received a copy of the GNU General Public License
|
||||||
// * along with this program. If not, see http://www.gnu.org/licenses/.// TestCBotView.cpp : implementation of the CTestCBotView class
|
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||||
|
|
||||||
|
// TestCBotView.cpp : implementation of the CTestCBotView class
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
|
|
@ -291,7 +291,7 @@ BOOL rfwrite (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception)
|
||||||
|
|
||||||
FILE* pFile= (FILE*)pVar->GivValInt();
|
FILE* pFile= (FILE*)pVar->GivValInt();
|
||||||
|
|
||||||
int res = fputs(param+"\n", pFile);
|
int res = fputs(param+CBotString("\n"), pFile);
|
||||||
|
|
||||||
// if an error occurs generate an exception
|
// if an error occurs generate an exception
|
||||||
if ( res < 0 ) { Exception = CBotErrWrite; return FALSE; }
|
if ( res < 0 ) { Exception = CBotErrWrite; return FALSE; }
|
||||||
|
|
|
@ -40,7 +40,12 @@
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "d3dapp.h"
|
#include "d3dapp.h"
|
||||||
|
|
||||||
|
// fix for "MSH_MOUSEWHEEL undefined" error
|
||||||
|
#ifdef UNICODE
|
||||||
|
#define MSH_MOUSEWHEEL L"MSWHEEL_ROLLMSG"
|
||||||
|
#else
|
||||||
|
#define MSH_MOUSEWHEEL "MSWHEEL_ROLLMSG"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define AUDIO_TRACK 13 // total number of audio tracks on the CD
|
#define AUDIO_TRACK 13 // total number of audio tracks on the CD
|
||||||
|
|
|
@ -107,6 +107,8 @@ static HRESULT WINAPI DeviceEnumCallback( TCHAR* strDesc, TCHAR* strName,
|
||||||
D3DDEVICEDESC7* pDesc,
|
D3DDEVICEDESC7* pDesc,
|
||||||
VOID* pParentInfo )
|
VOID* pParentInfo )
|
||||||
{
|
{
|
||||||
|
DWORD i;
|
||||||
|
|
||||||
// Keep track of # of devices that were enumerated
|
// Keep track of # of devices that were enumerated
|
||||||
g_dwNumDevicesEnumerated++;
|
g_dwNumDevicesEnumerated++;
|
||||||
|
|
||||||
|
@ -152,7 +154,7 @@ static HRESULT WINAPI DeviceEnumCallback( TCHAR* strDesc, TCHAR* strName,
|
||||||
return D3DENUMRET_OK;
|
return D3DENUMRET_OK;
|
||||||
|
|
||||||
// Build list of supported modes for the device
|
// Build list of supported modes for the device
|
||||||
for( DWORD i=0; i<pDriverInfo->dwNumModes; i++ )
|
for( i=0; i<pDriverInfo->dwNumModes; i++ )
|
||||||
{
|
{
|
||||||
DDSURFACEDESC2 ddsdMode = pDriverInfo->pddsdModes[i];
|
DDSURFACEDESC2 ddsdMode = pDriverInfo->pddsdModes[i];
|
||||||
DWORD dwRenderDepths = pDeviceInfo->ddDeviceDesc.dwDeviceRenderBitDepth;
|
DWORD dwRenderDepths = pDeviceInfo->ddDeviceDesc.dwDeviceRenderBitDepth;
|
||||||
|
@ -177,7 +179,7 @@ static HRESULT WINAPI DeviceEnumCallback( TCHAR* strDesc, TCHAR* strName,
|
||||||
return D3DENUMRET_OK;
|
return D3DENUMRET_OK;
|
||||||
|
|
||||||
// Find a 640x480x16 mode for the default fullscreen mode
|
// Find a 640x480x16 mode for the default fullscreen mode
|
||||||
for( DWORD i=0; i<pDeviceInfo->dwNumModes; i++ )
|
for( i=0; i<pDeviceInfo->dwNumModes; i++ )
|
||||||
{
|
{
|
||||||
if( ( pDeviceInfo->pddsdModes[i].dwWidth == 640 ) &&
|
if( ( pDeviceInfo->pddsdModes[i].dwWidth == 640 ) &&
|
||||||
( pDeviceInfo->pddsdModes[i].dwHeight == 480 ) &&
|
( pDeviceInfo->pddsdModes[i].dwHeight == 480 ) &&
|
||||||
|
|
|
@ -19,8 +19,10 @@
|
||||||
#define STRICT
|
#define STRICT
|
||||||
#define D3D_OVERLOADS
|
#define D3D_OVERLOADS
|
||||||
|
|
||||||
#include <windows.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <windows.h>
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
|
|
|
@ -79,6 +79,7 @@ BOOL CALLBACK EnumAxesCallback( const DIDEVICEOBJECTINSTANCE* pdidoi,
|
||||||
if( FAILED( g_pJoystick->SetProperty( DIPROP_RANGE, &diprg.diph ) ) )
|
if( FAILED( g_pJoystick->SetProperty( DIPROP_RANGE, &diprg.diph ) ) )
|
||||||
return DIENUM_STOP;
|
return DIENUM_STOP;
|
||||||
|
|
||||||
|
#ifndef __MINGW32__ // FIXME Doesn't work under MinGW
|
||||||
// Set the UI to reflect what axes the joystick supports
|
// Set the UI to reflect what axes the joystick supports
|
||||||
switch( pdidoi->dwOfs )
|
switch( pdidoi->dwOfs )
|
||||||
{
|
{
|
||||||
|
@ -107,6 +108,7 @@ BOOL CALLBACK EnumAxesCallback( const DIDEVICEOBJECTINSTANCE* pdidoi,
|
||||||
OutputDebugString("EnumAxesCallback -s1\n");
|
OutputDebugString("EnumAxesCallback -s1\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return DIENUM_CONTINUE;
|
return DIENUM_CONTINUE;
|
||||||
}
|
}
|
||||||
|
@ -120,8 +122,12 @@ BOOL InitDirectInput(HINSTANCE hInst, HWND hWnd)
|
||||||
|
|
||||||
// Register with the DirectInput subsystem and get a pointer
|
// Register with the DirectInput subsystem and get a pointer
|
||||||
// to a IDirectInput interface we can use.
|
// to a IDirectInput interface we can use.
|
||||||
|
#ifndef __MINGW32__ // FIXME Doesn't work under MinGW
|
||||||
hr = DirectInputCreateEx( hInst, DIRECTINPUT_VERSION,IID_IDirectInput7, (LPVOID*)&g_pDI, NULL );
|
hr = DirectInputCreateEx( hInst, DIRECTINPUT_VERSION,IID_IDirectInput7, (LPVOID*)&g_pDI, NULL );
|
||||||
if( FAILED(hr) ) return FALSE;;
|
if( FAILED(hr) ) return FALSE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Look for a simple joystick we can use for this sample program.
|
// Look for a simple joystick we can use for this sample program.
|
||||||
hr = g_pDI->EnumDevices( DIDEVTYPE_JOYSTICK, EnumJoysticksCallback,
|
hr = g_pDI->EnumDevices( DIDEVTYPE_JOYSTICK, EnumJoysticksCallback,
|
||||||
|
|
|
@ -20,15 +20,17 @@
|
||||||
#define D3D_OVERLOADS
|
#define D3D_OVERLOADS
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <ctype.h>
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "D3DMath.h"
|
#include "d3dmath.h"
|
||||||
#include "D3DUtil.h"
|
#include "d3dutil.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -23,10 +23,11 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "cbot/cbotdll.h"
|
#include "CBot/CBotDll.h"
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "D3DMath.h"
|
#include "d3dmath.h"
|
||||||
|
#include "d3dutil.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
11
src/object.h
11
src/object.h
|
@ -20,12 +20,15 @@
|
||||||
#define _OBJECT_H_
|
#define _OBJECT_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "d3dengine.h"
|
||||||
|
#include "camera.h"
|
||||||
|
#include "sound.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CD3DEngine;
|
|
||||||
class CLight;
|
class CLight;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CWater;
|
class CWater;
|
||||||
class CCamera;
|
|
||||||
class CParticule;
|
class CParticule;
|
||||||
class CPhysics;
|
class CPhysics;
|
||||||
class CBrain;
|
class CBrain;
|
||||||
|
@ -36,10 +39,6 @@ class CRobotMain;
|
||||||
class CBotVar;
|
class CBotVar;
|
||||||
class CScript;
|
class CScript;
|
||||||
|
|
||||||
enum CameraType;
|
|
||||||
enum Sound;
|
|
||||||
enum D3DShadowType;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// The father of all parts must always be the part number zero!
|
// The father of all parts must always be the part number zero!
|
||||||
|
|
|
@ -24,9 +24,10 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DMath.h"
|
#include "d3dmath.h"
|
||||||
#include "D3DTextr.h"
|
#include "d3dtextr.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
|
#include "d3dutil.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
#include "iman.h"
|
#include "iman.h"
|
||||||
#include "math3d.h"
|
#include "math3d.h"
|
||||||
|
|
|
@ -20,18 +20,15 @@
|
||||||
#define _PARTICULE_H_
|
#define _PARTICULE_H_
|
||||||
|
|
||||||
|
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
|
#include "sound.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CD3DEngine;
|
|
||||||
class CRobotMain;
|
class CRobotMain;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CWater;
|
class CWater;
|
||||||
class CObject;
|
class CObject;
|
||||||
class CSound;
|
|
||||||
|
|
||||||
enum Sound;
|
|
||||||
|
|
||||||
|
|
||||||
#define MAXPARTICULE 500
|
#define MAXPARTICULE 500
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "D3DMath.h"
|
#include "d3dmath.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
|
@ -3784,7 +3784,7 @@ void CPhysics::WheelParticule(int color, float width)
|
||||||
character = m_object->RetCharacter();
|
character = m_object->RetCharacter();
|
||||||
mat = m_object->RetWorldMatrix(0);
|
mat = m_object->RetWorldMatrix(0);
|
||||||
|
|
||||||
Draw a trace on the ground.
|
// Draw a trace on the ground.
|
||||||
if ( color >= 0 && color <= 17 )
|
if ( color >= 0 && color <= 17 )
|
||||||
{
|
{
|
||||||
parti = (ParticuleType)(PARTITRACE0+color);
|
parti = (ParticuleType)(PARTITRACE0+color);
|
||||||
|
|
|
@ -20,6 +20,10 @@
|
||||||
#define _PHYSICS_H_
|
#define _PHYSICS_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "d3dengine.h"
|
||||||
|
#include "misc.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CD3DEngine;
|
class CD3DEngine;
|
||||||
class CLight;
|
class CLight;
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "D3DMath.h"
|
#include "d3dmath.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "iman.h"
|
#include "iman.h"
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
#define _PLANET_H_
|
#define _PLANET_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "struct.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CD3DEngine;
|
class CD3DEngine;
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,11 @@
|
||||||
#define _PYRO_H_
|
#define _PYRO_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "d3dengine.h"
|
||||||
|
#include "object.h"
|
||||||
|
#include "misc.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CD3DEngine;
|
class CD3DEngine;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
|
@ -63,10 +68,6 @@ enum PyroType
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
enum ObjectType;
|
|
||||||
enum Error;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int part;
|
int part;
|
||||||
|
|
1728
src/restext.cpp
1728
src/restext.cpp
File diff suppressed because it is too large
Load Diff
|
@ -24,8 +24,10 @@
|
||||||
#define D3D_OVERLOADS
|
#define D3D_OVERLOADS
|
||||||
|
|
||||||
|
|
||||||
|
#include "d3dengine.h"
|
||||||
|
#include "event.h"
|
||||||
|
|
||||||
|
|
||||||
enum KeyRank;
|
|
||||||
|
|
||||||
|
|
||||||
// Possible types of the text resources.
|
// Possible types of the text resources.
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "cbot/cbotdll.h"
|
#include "CBot/CBotDll.h"
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "D3DMath.h"
|
#include "d3dmath.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
|
@ -95,7 +95,7 @@ float g_unit; // conversion factor
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "classfile.cpp"
|
#include "ClassFILE.cpp"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,13 @@
|
||||||
#define _ROBOTMAIN_H_
|
#define _ROBOTMAIN_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "d3dengine.h"
|
||||||
|
#include "struct.h"
|
||||||
|
#include "object.h"
|
||||||
|
#include "mainmovie.h"
|
||||||
|
#include "camera.h"
|
||||||
|
#include "particule.h"
|
||||||
|
|
||||||
|
|
||||||
enum Phase
|
enum Phase
|
||||||
{
|
{
|
||||||
|
@ -61,22 +68,18 @@ enum Phase
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CMainMovie;
|
|
||||||
class CMainDialog;
|
class CMainDialog;
|
||||||
class CMainShort;
|
class CMainShort;
|
||||||
class CMainMap;
|
class CMainMap;
|
||||||
class CEvent;
|
class CEvent;
|
||||||
class CD3DEngine;
|
class CD3DEngine;
|
||||||
class CLight;
|
class CLight;
|
||||||
class CParticule;
|
|
||||||
class CWater;
|
class CWater;
|
||||||
class CCloud;
|
class CCloud;
|
||||||
class CBlitz;
|
class CBlitz;
|
||||||
class CPlanet;
|
class CPlanet;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CObject;
|
|
||||||
class CModel;
|
class CModel;
|
||||||
class CCamera;
|
|
||||||
class CInterface;
|
class CInterface;
|
||||||
class CWindow;
|
class CWindow;
|
||||||
class CControl;
|
class CControl;
|
||||||
|
@ -84,11 +87,6 @@ class CDisplayText;
|
||||||
class CDisplayInfo;
|
class CDisplayInfo;
|
||||||
class CSound;
|
class CSound;
|
||||||
|
|
||||||
enum ObjectType;
|
|
||||||
enum CameraType;
|
|
||||||
enum MainMovieType;
|
|
||||||
enum ParticuleType;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "cbot/cbotdll.h"
|
#include "CBot/CBotDll.h"
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "D3DMath.h"
|
#include "d3dmath.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
#define _SCRIPT_H_
|
#define _SCRIPT_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "event.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CD3DEngine;
|
class CD3DEngine;
|
||||||
class CInterface;
|
class CInterface;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "math3d.h"
|
#include "math3d.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
@ -39,8 +39,6 @@
|
||||||
|
|
||||||
CScroll::CScroll(CInstanceManager* iMan) : CControl(iMan)
|
CScroll::CScroll(CInstanceManager* iMan) : CControl(iMan)
|
||||||
{
|
{
|
||||||
CControl::CControl(iMan);
|
|
||||||
|
|
||||||
m_buttonUp = 0;
|
m_buttonUp = 0;
|
||||||
m_buttonDown = 0;
|
m_buttonDown = 0;
|
||||||
|
|
||||||
|
@ -60,8 +58,6 @@ CScroll::~CScroll()
|
||||||
{
|
{
|
||||||
delete m_buttonUp;
|
delete m_buttonUp;
|
||||||
delete m_buttonDown;
|
delete m_buttonDown;
|
||||||
|
|
||||||
CControl::~CControl();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include "control.h"
|
#include "control.h"
|
||||||
|
#include "struct.h"
|
||||||
|
|
||||||
|
|
||||||
class CD3DEngine;
|
class CD3DEngine;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "math3d.h"
|
#include "math3d.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
@ -38,7 +38,6 @@
|
||||||
|
|
||||||
CShortcut::CShortcut(CInstanceManager* iMan) : CControl(iMan)
|
CShortcut::CShortcut(CInstanceManager* iMan) : CControl(iMan)
|
||||||
{
|
{
|
||||||
CControl::CControl(iMan);
|
|
||||||
m_time = 0.0f;
|
m_time = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +45,6 @@ CShortcut::CShortcut(CInstanceManager* iMan) : CControl(iMan)
|
||||||
|
|
||||||
CShortcut::~CShortcut()
|
CShortcut::~CShortcut()
|
||||||
{
|
{
|
||||||
CControl::~CControl();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "math3d.h"
|
#include "math3d.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
|
|
||||||
CSlider::CSlider(CInstanceManager* iMan) : CControl(iMan)
|
CSlider::CSlider(CInstanceManager* iMan) : CControl(iMan)
|
||||||
{
|
{
|
||||||
CControl::CControl(iMan);
|
|
||||||
|
|
||||||
m_buttonLeft = 0;
|
m_buttonLeft = 0;
|
||||||
m_buttonRight = 0;
|
m_buttonRight = 0;
|
||||||
|
|
||||||
|
@ -70,8 +68,6 @@ CSlider::~CSlider()
|
||||||
{
|
{
|
||||||
delete m_buttonLeft;
|
delete m_buttonLeft;
|
||||||
delete m_buttonRight;
|
delete m_buttonRight;
|
||||||
|
|
||||||
CControl::~CControl();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include "control.h"
|
#include "control.h"
|
||||||
|
#include "struct.h"
|
||||||
|
|
||||||
|
|
||||||
class CD3DEngine;
|
class CD3DEngine;
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
#define STRICT
|
#define STRICT
|
||||||
#define D3D_OVERLOADS
|
#define D3D_OVERLOADS
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <d3dtypes.h>
|
||||||
#include <dsound.h>
|
#include <dsound.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
|
|
|
@ -16,6 +16,9 @@
|
||||||
|
|
||||||
// sound.h
|
// sound.h
|
||||||
|
|
||||||
|
#ifndef SOUND_H
|
||||||
|
#define SOUND_H
|
||||||
|
|
||||||
|
|
||||||
#include <dsound.h>
|
#include <dsound.h>
|
||||||
|
|
||||||
|
@ -239,3 +242,4 @@ protected:
|
||||||
char m_CDpath[100];
|
char m_CDpath[100];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // SOUND_H
|
||||||
|
|
|
@ -19,16 +19,18 @@
|
||||||
#define STRICT
|
#define STRICT
|
||||||
#define D3D_OVERLOADS
|
#define D3D_OVERLOADS
|
||||||
|
|
||||||
#include <windows.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <windows.h>
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "D3DMath.h"
|
#include "d3dmath.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -20,6 +20,10 @@
|
||||||
#define _STUDIO_H_
|
#define _STUDIO_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "object.h"
|
||||||
|
#include "script.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CD3DEngine;
|
class CD3DEngine;
|
||||||
class CEvent;
|
class CEvent;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "math3d.h"
|
#include "math3d.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
@ -41,14 +41,12 @@
|
||||||
|
|
||||||
CTarget::CTarget(CInstanceManager* iMan) : CControl(iMan)
|
CTarget::CTarget(CInstanceManager* iMan) : CControl(iMan)
|
||||||
{
|
{
|
||||||
CControl::CControl(iMan);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Object's destructor.
|
// Object's destructor.
|
||||||
|
|
||||||
CTarget::~CTarget()
|
CTarget::~CTarget()
|
||||||
{
|
{
|
||||||
CControl::~CControl();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "math3d.h"
|
#include "math3d.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
#define _TASK_H_
|
#define _TASK_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "misc.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CD3DEngine;
|
class CD3DEngine;
|
||||||
class CEngine;
|
class CEngine;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "math3d.h"
|
#include "math3d.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -20,6 +20,10 @@
|
||||||
#define _TASKADVANCE_H_
|
#define _TASKADVANCE_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "misc.h"
|
||||||
|
#include "d3dengine.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CBrain;
|
class CBrain;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "math3d.h"
|
#include "math3d.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -20,11 +20,14 @@
|
||||||
#define _TASKBUILD_H_
|
#define _TASKBUILD_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "misc.h"
|
||||||
|
#include "object.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CBrain;
|
class CBrain;
|
||||||
class CPhysics;
|
class CPhysics;
|
||||||
class CObject;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
#define _TASKTIRE_H_
|
#define _TASKTIRE_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "misc.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CBrain;
|
class CBrain;
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
#define _TASKTIREANT_H_
|
#define _TASKTIREANT_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "d3dengine.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CBrain;
|
class CBrain;
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "D3DMath.h"
|
#include "d3dmath.h"
|
||||||
#include "math3d.h"
|
#include "math3d.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
#define _TASKFLAG_H_
|
#define _TASKFLAG_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "misc.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CBrain;
|
class CBrain;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "math3d.h"
|
#include "math3d.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -20,6 +20,10 @@
|
||||||
#define _TASKGOTO_H_
|
#define _TASKGOTO_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "misc.h"
|
||||||
|
#include "d3dengine.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CBrain;
|
class CBrain;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "math3d.h"
|
#include "math3d.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
#define _TASKGUNGOAL_H_
|
#define _TASKGUNGOAL_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "misc.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CBrain;
|
class CBrain;
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
#define _TASKINFO_H_
|
#define _TASKINFO_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "misc.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CBrain;
|
class CBrain;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "iman.h"
|
#include "iman.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
|
|
|
@ -19,18 +19,17 @@
|
||||||
#ifndef _TASKMANAGER_H_
|
#ifndef _TASKMANAGER_H_
|
||||||
#define _TASKMANAGER_H_
|
#define _TASKMANAGER_H_
|
||||||
|
|
||||||
|
#include "misc.h"
|
||||||
|
#include "object.h"
|
||||||
|
#include "taskmanip.h"
|
||||||
|
#include "taskgoto.h"
|
||||||
|
#include "taskshield.h"
|
||||||
|
#include "taskflag.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CTask;
|
class CTask;
|
||||||
|
|
||||||
enum TaskManipOrder;
|
|
||||||
enum TaskManipArm;
|
|
||||||
enum TaskFlagOrder;
|
|
||||||
enum TaskGotoGoal;
|
|
||||||
enum TaskGotoCrash;
|
|
||||||
enum TaskShieldMode;
|
|
||||||
enum ObjectType;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class CTaskManager
|
class CTaskManager
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "D3DMath.h"
|
#include "d3dmath.h"
|
||||||
#include "math3d.h"
|
#include "math3d.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -20,6 +20,11 @@
|
||||||
#define _TASKMANIP_H_
|
#define _TASKMANIP_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "task.h"
|
||||||
|
#include "misc.h"
|
||||||
|
#include "d3dengine.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CBrain;
|
class CBrain;
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
#define _TASKSPEN_H_
|
#define _TASKSPEN_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "d3dengine.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CBrain;
|
class CBrain;
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
#define _TASKSRECOVER_H_
|
#define _TASKSRECOVER_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "d3dengine.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CBrain;
|
class CBrain;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "math3d.h"
|
#include "math3d.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -20,6 +20,10 @@
|
||||||
#define _TASKRESET_H_
|
#define _TASKRESET_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "misc.h"
|
||||||
|
#include "d3dengine.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CBrain;
|
class CBrain;
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
#define _TASKSEARCH_H_
|
#define _TASKSEARCH_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "misc.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CBrain;
|
class CBrain;
|
||||||
|
|
|
@ -20,6 +20,10 @@
|
||||||
#define _TASKSHIELD_H_
|
#define _TASKSHIELD_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "misc.h"
|
||||||
|
#include "d3dengine.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CBrain;
|
class CBrain;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "math3d.h"
|
#include "math3d.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
#define _TASKSPIDEREXPLO_H_
|
#define _TASKSPIDEREXPLO_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "misc.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CBrain;
|
class CBrain;
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "D3DMath.h"
|
#include "d3dmath.h"
|
||||||
#include "math3d.h"
|
#include "math3d.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -20,6 +20,10 @@
|
||||||
#define _TASKTAKE_H_
|
#define _TASKTAKE_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "misc.h"
|
||||||
|
#include "object.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CBrain;
|
class CBrain;
|
||||||
|
|
|
@ -20,6 +20,10 @@
|
||||||
#define _TASKSTERRAFORM_H_
|
#define _TASKSTERRAFORM_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "misc.h"
|
||||||
|
#include "d3dengine.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CBrain;
|
class CBrain;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "math3d.h"
|
#include "math3d.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
#define _TASKTURN_H_
|
#define _TASKTURN_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "misc.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CBrain;
|
class CBrain;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "math3d.h"
|
#include "math3d.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
#define _TASKWAIT_H_
|
#define _TASKWAIT_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "misc.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CTerrain;
|
class CTerrain;
|
||||||
class CBrain;
|
class CBrain;
|
||||||
|
|
|
@ -24,8 +24,9 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "D3DMath.h"
|
#include "d3dmath.h"
|
||||||
|
#include "d3dutil.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
#define _TERRAIN_H_
|
#define _TERRAIN_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "d3dengine.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CD3DEngine;
|
class CD3DEngine;
|
||||||
class CWater;
|
class CWater;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -20,9 +20,10 @@
|
||||||
#define _TEXT_H_
|
#define _TEXT_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "d3dengine.h"
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
class CInstanceManager;
|
||||||
class CD3DEngine;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,9 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "D3DMath.h"
|
#include "d3dmath.h"
|
||||||
|
#include "d3dutil.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "iman.h"
|
#include "iman.h"
|
||||||
|
|
12
src/water.h
12
src/water.h
|
@ -20,13 +20,13 @@
|
||||||
#define _WATER_H_
|
#define _WATER_H_
|
||||||
|
|
||||||
|
|
||||||
class CInstanceManager;
|
#include "d3dengine.h"
|
||||||
class CD3DEngine;
|
#include "particule.h"
|
||||||
class CTerrain;
|
|
||||||
class CParticule;
|
|
||||||
class CSound;
|
|
||||||
|
|
||||||
enum ParticuleType;
|
|
||||||
|
class CInstanceManager;
|
||||||
|
class CTerrain;
|
||||||
|
class CSound;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <d3d.h>
|
#include <d3d.h>
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "D3DEngine.h"
|
#include "d3dengine.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
#include "math3d.h"
|
#include "math3d.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
|
@ -60,8 +60,6 @@ CWindow::CWindow(CInstanceManager* iMan) : CControl(iMan)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
CControl::CControl(iMan);
|
|
||||||
|
|
||||||
for ( i=0 ; i<MAXWINDOW ; i++ )
|
for ( i=0 ; i<MAXWINDOW ; i++ )
|
||||||
{
|
{
|
||||||
m_table[i] = 0;
|
m_table[i] = 0;
|
||||||
|
@ -92,7 +90,6 @@ CWindow::CWindow(CInstanceManager* iMan) : CControl(iMan)
|
||||||
CWindow::~CWindow()
|
CWindow::~CWindow()
|
||||||
{
|
{
|
||||||
Flush();
|
Flush();
|
||||||
CControl::~CControl();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -993,7 +990,7 @@ BOOL CWindow::EventProcess(const Event &event)
|
||||||
else if ( ((flags & (1<<0)) && (flags & (1<<3))) ||
|
else if ( ((flags & (1<<0)) && (flags & (1<<3))) ||
|
||||||
((flags & (1<<1)) && (flags & (1<<2))) )
|
((flags & (1<<1)) && (flags & (1<<2))) )
|
||||||
{
|
{
|
||||||
m_pressMouse = D3DMOUSEMOVEI; // \
|
m_pressMouse = D3DMOUSEMOVEI; // \ //
|
||||||
}
|
}
|
||||||
else if ( ((flags & (1<<0)) && (flags & (1<<1))) ||
|
else if ( ((flags & (1<<0)) && (flags & (1<<1))) ||
|
||||||
((flags & (1<<2)) && (flags & (1<<3))) )
|
((flags & (1<<2)) && (flags & (1<<3))) )
|
||||||
|
|
Loading…
Reference in New Issue