Update of /cvsroot/wpdev/wolfpack/ai
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7955/ai
Modified Files:
ai.cpp ai.h ai_animals.cpp ai_humans.cpp ai_monsters.cpp
Log Message:
had to fix VC6 compiler issue
Index: ai_animals.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/ai/ai_animals.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** ai_animals.cpp 9 Oct 2004 14:32:21 -0000 1.17
--- ai_animals.cpp 16 Oct 2004 04:53:23 -0000 1.18
***************
*** 40,50 ****
--- 40,59 ----
void Animal_Wild::registerInFactory()
{
+ #ifndef __VC6
AIFactory::instance()->registerType( "Animal_Wild", productCreatorFunctor<Animal_Wild> );
AIFactory::instance()->registerType( "Animal_Aggressive", productCreatorFunctor<Animal_Wild> );
+ #else
+ AIFactory::instance()->registerType( "Animal_Wild", productCreatorFunctor_Animal_Wild );
+ AIFactory::instance()->registerType( "Animal_Aggressive", productCreatorFunctor_Animal_Wild );
+ #endif
}
void Animal_Domestic::registerInFactory()
{
+ #ifndef __VC6
AIFactory::instance()->registerType( "Animal_Domestic", productCreatorFunctor<Animal_Domestic> );
+ #else
+ AIFactory::instance()->registerType( "Animal_Domestic", productCreatorFunctor_Animal_Domestic );
+ #endif
}
Index: ai_humans.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/ai/ai_humans.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** ai_humans.cpp 9 Oct 2004 14:32:21 -0000 1.24
--- ai_humans.cpp 16 Oct 2004 04:53:23 -0000 1.25
***************
*** 47,51 ****
--- 47,55 ----
void Human_Vendor::registerInFactory()
{
+ #ifndef __VC6
AIFactory::instance()->registerType( "Human_Vendor", productCreatorFunctor<Human_Vendor> );
+ #else
+ AIFactory::instance()->registerType( "Human_Vendor", productCreatorFunctor_Human_Vendor );
+ #endif
}
***************
*** 82,86 ****
--- 86,94 ----
void Human_Stablemaster::registerInFactory()
{
+ #ifndef __VC6
AIFactory::instance()->registerType( "Human_Stablemaster", productCreatorFunctor<Human_Stablemaster> );
+ #else
+ AIFactory::instance()->registerType( "Human_Vendor", productCreatorFunctor_Human_Stablemaster );
+ #endif
}
***************
*** 217,221 ****
--- 225,233 ----
void Human_Guard_Called::registerInFactory()
{
+ #ifndef __VC6
AIFactory::instance()->registerType( "Human_Guard_Called", productCreatorFunctor<Human_Guard_Called> );
+ #else
+ AIFactory::instance()->registerType( "Human_Guard_Called", productCreatorFunctor_Human_Guard_Called );
+ #endif
}
***************
*** 326,330 ****
--- 338,346 ----
void Human_Guard::registerInFactory()
{
+ #ifndef __VC6
AIFactory::instance()->registerType( "Human_Guard", productCreatorFunctor<Human_Guard> );
+ #else
+ AIFactory::instance()->registerType( "Human_Guard", productCreatorFunctor_Human_Guard );
+ #endif
}
Index: ai.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/ai/ai.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** ai.h 10 Oct 2004 17:51:24 -0000 1.19
--- ai.h 16 Oct 2004 04:53:23 -0000 1.20
***************
*** 853,856 ****
--- 853,857 ----
};
+ #ifndef __VC6
template< typename T >
AbstractAI* productCreatorFunctor()
***************
*** 858,861 ****
return new T(0);
}
!
#endif /* AI_H_HEADER_INCLUDED */
--- 859,872 ----
return new T(0);
}
! #else
! AbstractAI* productCreatorFunctor_Animal_Domestic( );
! AbstractAI* productCreatorFunctor_Animal_Wild( );
! AbstractAI* productCreatorFunctor_Human_Guard( );
! AbstractAI* productCreatorFunctor_Human_Guard_Called( );
! AbstractAI* productCreatorFunctor_Human_Vendor( );
! AbstractAI* productCreatorFunctor_Human_Stablemaster( );
! AbstractAI* productCreatorFunctor_Monster_Aggressive_L0( );
! AbstractAI* productCreatorFunctor_Monster_Berserk( );
! AbstractAI* productCreatorFunctor_Monster_Aggressive_L1( );
! #endif
#endif /* AI_H_HEADER_INCLUDED */
Index: ai.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/ai/ai.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** ai.cpp 11 Oct 2004 19:03:42 -0000 1.38
--- ai.cpp 16 Oct 2004 04:53:23 -0000 1.39
***************
*** 51,54 ****
--- 51,98 ----
*****************************************************************************/
+ #ifdef __VC6
+
+ AbstractAI* productCreatorFunctor_Animal_Domestic( )
+ {
+ return new Animal_Domestic(0);
+ }
+
+ AbstractAI* productCreatorFunctor_Animal_Wild( )
+ {
+ return new Animal_Wild(0);
+ }
+
+ AbstractAI* productCreatorFunctor_Human_Guard( )
+ {
+ return new Human_Guard(0);
+ }
+
+ AbstractAI* productCreatorFunctor_Human_Guard_Called( )
+ {
+ return new Human_Guard_Called(0);
+ }
+
+ AbstractAI* productCreatorFunctor_Human_Vendor( )
+ {
+ return new Human_Vendor(0);
+ }
+
+ AbstractAI* productCreatorFunctor_Human_Stablemaster( )
+ {
+ return new Human_Stablemaster(0);
+ }
+ AbstractAI* productCreatorFunctor_Monster_Aggressive_L0( )
+ {
+ return new Monster_Aggressive_L0(0);
+ }
+ AbstractAI* productCreatorFunctor_Monster_Berserk( )
+ {
+ return new Monster_Berserk(0);
+ }
+ AbstractAI* productCreatorFunctor_Monster_Aggressive_L1( )
+ {
+ return new Monster_Aggressive_L1(0);
+ }
+ #endif
void cAIFactory::checkScriptAI( const QStringList& oldSections, const QStringList& newSections )
{
Index: ai_monsters.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/ai/ai_monsters.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** ai_monsters.cpp 10 Oct 2004 17:51:25 -0000 1.26
--- ai_monsters.cpp 16 Oct 2004 04:53:23 -0000 1.27
***************
*** 159,163 ****
--- 159,167 ----
void Monster_Aggressive_L0::registerInFactory()
{
+ #ifndef __VC6
AIFactory::instance()->registerType( "Monster_Aggressive_L0", productCreatorFunctor<Monster_Aggressive_L0> );
+ #else
+ AIFactory::instance()->registerType( "Monster_Aggressive_L0", productCreatorFunctor_Monster_Aggressive_L0 );
+ #endif
}
***************
*** 168,172 ****
--- 172,180 ----
void Monster_Berserk::registerInFactory()
{
+ #ifndef __VC6
AIFactory::instance()->registerType( "Monster_Berserk", productCreatorFunctor<Monster_Berserk> );
+ #else
+ AIFactory::instance()->registerType( "Monster_Berserk", productCreatorFunctor_Monster_Berserk );
+ #endif
}
***************
*** 177,181 ****
--- 185,193 ----
void Monster_Aggressive_L1::registerInFactory()
{
+ #ifndef __VC6
AIFactory::instance()->registerType( "Monster_Aggressive_L1", productCreatorFunctor<Monster_Aggressive_L1> );
+ #else
+ AIFactory::instance()->registerType( "Monster_Aggressive_L1", productCreatorFunctor_Monster_Aggressive_L1 );
+ #endif
}
|