- Timestamp:
- Dec 11, 2006, 11:12:11 PM (18 years ago)
- Location:
- branches/ai/src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ai/src/ai/Makefile
r10029 r10041 1 # Makefile.in generated by automake 1.9. 5from Makefile.am.1 # Makefile.in generated by automake 1.9.6 from Makefile.am. 2 2 # src/ai/Makefile. Generated from Makefile.in by configure. 3 3 … … 15 15 16 16 17 18 SOURCES = $(libORXai_a_SOURCES)19 17 20 18 srcdir = . … … 75 73 CTAGS = ctags 76 74 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 77 ACLOCAL = ${SHELL} /home/t fahrni/Projekte/Orxonox/mybranche/missing --run aclocal-1.975 ACLOCAL = ${SHELL} /home/thomas/Projects/Orxonox/aibranch/missing --run aclocal-1.9 78 76 AMDEP_FALSE = # 79 77 AMDEP_TRUE = 80 AMTAR = ${SHELL} /home/t fahrni/Projekte/Orxonox/mybranche/missing --run tar81 AUTOCONF = ${SHELL} /home/t fahrni/Projekte/Orxonox/mybranche/missing --run autoconf82 AUTOHEADER = ${SHELL} /home/t fahrni/Projekte/Orxonox/mybranche/missing --run autoheader83 AUTOMAKE = ${SHELL} /home/t fahrni/Projekte/Orxonox/mybranche/missing --run automake-1.984 AWK = gawk78 AMTAR = ${SHELL} /home/thomas/Projects/Orxonox/aibranch/missing --run tar 79 AUTOCONF = ${SHELL} /home/thomas/Projects/Orxonox/aibranch/missing --run autoconf 80 AUTOHEADER = ${SHELL} /home/thomas/Projects/Orxonox/aibranch/missing --run autoheader 81 AUTOMAKE = ${SHELL} /home/thomas/Projects/Orxonox/aibranch/missing --run automake-1.9 82 AWK = mawk 85 83 CC = gcc 86 84 CCDEPMODE = depmode=gcc3 87 85 CFLAGS = -g -O2 88 86 CPP = gcc -E 89 CPPFLAGS = -g -Wall -I/usr/ pack/gamelibs-1.0-to/include -I/usr/pack/sdl-1.2.11-mo/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT87 CPPFLAGS = -g -Wall -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/lua50 90 88 CURL_CFLAGS = 91 CURL_LIBS = 89 CURL_LIBS = -L/usr/lib -lcurl -L/usr/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lkrb5support -lcom_err -lresolv -lidn -lssl -lcrypto -ldl -lssl -lcrypto -lz 92 90 CXX = g++ 93 91 CXXDEPMODE = depmode=gcc3 … … 99 97 DOCUMENTATION_FALSE = 100 98 DOCUMENTATION_TRUE = # 101 DOXYGEN = /usr/sepp/bin/doxygen102 DOXYGEN_FALSE = #103 DOXYGEN_TRUE = 99 DOXYGEN = 100 DOXYGEN_FALSE = 101 DOXYGEN_TRUE = # 104 102 ECHO_C = 105 103 ECHO_N = -n 106 104 ECHO_T = 107 EGREP = grep -E105 EGREP = /bin/grep -E 108 106 EXEEXT = 109 107 GPROF = /usr/bin/gprof 110 HAVE_CURL_FALSE = 111 HAVE_CURL_TRUE = # 108 GREP = /bin/grep 109 HAVE_CURL_FALSE = # 110 HAVE_CURL_TRUE = 112 111 INSTALL_DATA = ${INSTALL} -m 644 113 112 INSTALL_PROGRAM = ${INSTALL} 114 113 INSTALL_SCRIPT = ${INSTALL} 115 114 INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s 116 LDFLAGS = -L/usr/ pack/gamelibs-1.0-to/i686-debian-linux3.1/lib -Wl,-rpath -Wl,/usr/pack/gamelibs-1.0-to/i686-debian-linux3.1/lib -L/usr/pack/qt-4.1.1-mo/i686-debian-linux3.1/lib -Wl,-rpath -Wl,/usr/pack/qt-4.1.1-mo/i686-debian-linux3.1/lib115 LDFLAGS = -L/usr/lib -Wl,-rpath -Wl,/usr/lib 117 116 LIBOBJS = 118 LIBS = -ldl -lGL -lGLU -lGLEW -lopenal -lSDL -lSDL_ttf -lSDL_image -lSDL_net -lavcodec -lavformat -lavcodec -lavutil -l vorbisenc -lvorbisfile -lvorbis -logg -lQtCore -lQtGui -lQtOpenGL-lz -lm117 LIBS = -ldl -lGL -lGLU -lGLEW -lopenal -lSDL -lSDL_ttf -lSDL_image -lSDL_net -lavcodec -lavformat -lavcodec -lavutil -ltheora -ldts -lgsm -ldc1394_control -lvorbisenc -lvorbisfile -lvorbis -logg -lQtCore -lQtGui -lQtOpenGL -lcurl -lz -lm 119 118 LTLIBOBJS = 120 LUA_INCLUDES = -I/extern_libs121 LUA_LIBS = -llualib -llua122 MAKEINFO = ${SHELL} /home/t fahrni/Projekte/Orxonox/mybranche/missing --run makeinfo119 LUA_INCLUDES = 120 LUA_LIBS = -llua50 -llualib 121 MAKEINFO = ${SHELL} /home/thomas/Projects/Orxonox/aibranch/missing --run makeinfo 123 122 MSBITFIELDS = 124 123 OBJEXT = o … … 131 130 PATH_SEPARATOR = : 132 131 QT_CFLAGS = 133 QT_CXXFLAGS = -I/usr/ pack/qt-4.1.1-mo/i686-debian-linux3.1/include132 QT_CXXFLAGS = -I/usr/include/qt4 134 133 QT_INCLUDE_DIR = 135 134 QT_LDFLAGS = 136 135 QT_LIBS = -lQtCore 137 QT_MOC = /usr/ pack/qt-4.1.1-mo/i686-debian-linux3.1/bin/moc138 QT_RCC = /usr/ pack/qt-4.1.1-mo/i686-debian-linux3.1/bin/rcc139 QT_UIC = /usr/ pack/qt-4.1.1-mo/i686-debian-linux3.1/bin/uic136 QT_MOC = /usr/bin/moc-qt4 137 QT_RCC = /usr/bin/rcc 138 QT_UIC = /usr/bin/uic 140 139 RANLIB = ranlib 141 140 SET_MAKE = 142 SHELL = /bin/ sh141 SHELL = /bin/bash 143 142 STRIP = 144 143 SUB_PROJECTS_FALSE = … … 147 146 ac_ct_CC = gcc 148 147 ac_ct_CXX = g++ 149 ac_ct_RANLIB = ranlib150 ac_ct_STRIP =151 148 am__fastdepCC_FALSE = # 152 149 am__fastdepCC_TRUE = … … 164 161 build_os = linux-gnu 165 162 build_vendor = pc 166 datadir = ${prefix}/share 163 datadir = ${datarootdir} 164 datarootdir = ${prefix}/share 165 docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} 166 dvidir = ${docdir} 167 167 exec_prefix = ${prefix} 168 168 host = i686-pc-linux-gnu … … 171 171 host_os = linux-gnu 172 172 host_vendor = pc 173 htmldir = ${docdir} 173 174 includedir = ${prefix}/include 174 infodir = ${ prefix}/info175 install_sh = /home/t fahrni/Projekte/Orxonox/mybranche/install-sh175 infodir = ${datarootdir}/info 176 install_sh = /home/thomas/Projects/Orxonox/aibranch/install-sh 176 177 libdir = ${exec_prefix}/lib 177 178 libexecdir = ${exec_prefix}/libexec 179 localedir = ${datarootdir}/locale 178 180 localstatedir = ${prefix}/var 179 mandir = ${ prefix}/man181 mandir = ${datarootdir}/man 180 182 mkdir_p = mkdir -p -- 181 183 oldincludedir = /usr/include 184 pdfdir = ${docdir} 182 185 prefix = /usr/local 183 186 program_transform_name = s,x,x, 187 psdir = ${docdir} 184 188 sbindir = ${exec_prefix}/sbin 185 189 sharedstatedir = ${prefix}/com -
branches/ai/src/ai/Makefile.in
r10029 r10041 1 # Makefile.in generated by automake 1.9. 5from Makefile.am.1 # Makefile.in generated by automake 1.9.6 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 15 15 @SET_MAKE@ 16 16 17 18 SOURCES = $(libORXai_a_SOURCES)19 17 20 18 srcdir = @srcdir@ … … 108 106 EXEEXT = @EXEEXT@ 109 107 GPROF = @GPROF@ 108 GREP = @GREP@ 110 109 HAVE_CURL_FALSE = @HAVE_CURL_FALSE@ 111 110 HAVE_CURL_TRUE = @HAVE_CURL_TRUE@ … … 147 146 ac_ct_CC = @ac_ct_CC@ 148 147 ac_ct_CXX = @ac_ct_CXX@ 149 ac_ct_RANLIB = @ac_ct_RANLIB@150 ac_ct_STRIP = @ac_ct_STRIP@151 148 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ 152 149 am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ … … 165 162 build_vendor = @build_vendor@ 166 163 datadir = @datadir@ 164 datarootdir = @datarootdir@ 165 docdir = @docdir@ 166 dvidir = @dvidir@ 167 167 exec_prefix = @exec_prefix@ 168 168 host = @host@ … … 171 171 host_os = @host_os@ 172 172 host_vendor = @host_vendor@ 173 htmldir = @htmldir@ 173 174 includedir = @includedir@ 174 175 infodir = @infodir@ … … 176 177 libdir = @libdir@ 177 178 libexecdir = @libexecdir@ 179 localedir = @localedir@ 178 180 localstatedir = @localstatedir@ 179 181 mandir = @mandir@ 180 182 mkdir_p = @mkdir_p@ 181 183 oldincludedir = @oldincludedir@ 184 pdfdir = @pdfdir@ 182 185 prefix = @prefix@ 183 186 program_transform_name = @program_transform_name@ 187 psdir = @psdir@ 184 188 sbindir = @sbindir@ 185 189 sharedstatedir = @sharedstatedir@ -
branches/ai/src/ai/ai_engine.cc
r10040 r10041 30 30 31 31 32 33 /*AITeam* AIEngine::newTeam() 34 { 35 AITeam* newTeam=new AITeam; 36 teams.push_back(newTeam); 37 return newTeam; 38 }*/ 39 int AIEngine::newTeam() 40 { 41 AITeam* newTeam=new AITeam; 42 teams.push_back(newTeam); 43 return teams.size()-1; 44 } 45 46 47 48 AITeam* AIEngine::getTeam(int aiTeamNumber) 49 { 50 //if(teams.size()>aiTeamNumber) 51 return teams.at(aiTeamNumber); 52 //return NULL; 53 } 54 55 56 32 57 void AIEngine::process() 33 58 { 34 PRINTF(0)("Processing AI..\n"); 59 int teamCount=teams.size(); 60 for(int i=0; i < teamCount; i++ ) 61 { 62 //std::cout << "Processing Team " << i << "...\n"; 63 teams.at(i)->process(); 64 } 35 65 } -
branches/ai/src/ai/ai_engine.h
r10040 r10041 14 14 15 15 void process(); 16 private: 17 AIEngine(); 16 AITeam* getTeam(int); 17 int newTeam(); 18 private: 19 AIEngine(); 18 20 19 21 private: -
branches/ai/src/ai/ai_team.cc
r10029 r10041 15 15 co-programmer: 16 16 */ 17 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ WORLD_ENTITY17 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_AI 18 18 19 19 #include "ai_team.h" … … 26 26 27 27 void AITeam::process() 28 {} 28 { 29 int teamSize=teamMembers.size(); 30 for(int i=0; i < teamSize; i++ ) 31 { 32 //std::cout << "Processing TeamMember " << i << "...\n"; 33 teamMembers.at(i)->process(); 34 } 35 } 36 37 38 void AITeam::addMember(AITeamMember* newMember) 39 { 40 teamMembers.push_back(newMember); 41 } 42 43 44 AITeamMember* AITeam::getTeamMember(int teamMemberID) 45 { 46 return teamMembers.at(teamMemberID); 47 } -
branches/ai/src/ai/ai_team.h
r10029 r10041 11 11 ~AITeam(); 12 12 void process(); 13 void addMember(AITeamMember*); 14 AITeamMember* getTeamMember(int); 13 15 private: 14 16 std::vector<AITeamMember*> teamMembers; -
branches/ai/src/ai/ai_team_member.cc
r10029 r10041 1 2 3 1 /* 4 2 orxonox - the future of 3D-vertical-scrollers … … 12 10 13 11 ### File Specific: 14 main-programmer: Patrick Boenzli12 main-programmer: Thomas Fahrni 15 13 co-programmer: 16 14 */ 17 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY18 15 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_AI 19 17 #include "ai_team_member.h" 18 #include "ai_engine.h" 20 19 21 20 AITeamMember::AITeamMember() … … 25 24 {} 26 25 26 27 27 28 void AITeamMember::process() 28 {} 29 { 30 int moduleCount=modules.size(); 31 for(int i=0; i < moduleCount; i++ ) 32 { 33 std::cout << "Processing AIModule " << i << "...\n"; 34 modules.at(i)->process(); 35 } 36 } 37 38 39 29 40 30 41 void AITeamMember::addToTeam(int aiTeamNumber) 31 {} 42 { 43 //funktionniert nur so pseudomässig... 44 AIEngine* aiEngine=AIEngine::getInstance(); 45 int teamNumber=aiEngine->newTeam(); 46 aiEngine->getTeam(teamNumber)->addMember(this); 47 } 32 48 49 50 51 52 void AITeamMember::addModule(AIModule* newModule){ 53 modules.push_back(newModule); 54 } -
branches/ai/src/ai/ai_team_member.h
r10029 r10041 6 6 #include "ai_module.h" 7 7 8 8 9 class AITeamMember : public WorldEntity{ 9 10 public: … … 12 13 13 14 void process(); 14 void addToTeam(int aiTeamNumber); 15 void addToTeam(int); 16 void addModule(AIModule*); 15 17 private: 16 std::vector<AIModule > modules;18 std::vector<AIModule*> modules; 17 19 }; 18 20 -
branches/ai/src/ai/movement_module.cc
r10029 r10041 27 27 28 28 void MovementModule::process() 29 {} 29 { 30 31 //How does the Module know the AITeamMember it belongs to?? 32 33 /*Vector absPosition = this->getAbsCoor(); 34 35 PRINTF(0)(" npc abs coor: %f, %f, %f\n", absPosition.x, absPosition.y, absPosition.z); 36 37 Player* pl = State::getPlayer(); 38 Vector playerAbsPos = pl->getPlayable()->getAbsCoor(); 39 40 PRINTF(0)(" player abs coor: %f, %f, %f\n", playerAbsPos.x, playerAbsPos.y, playerAbsPos.z); 30 41 31 42 43 // intelligent reaction 44 45 Vector distanceVector = playerAbsPos - absPosition; 46 distanceVector.normalize(); 47 48 float speed = 10.0f; 49 50 this->shiftCoor( distanceVector * speed * dt);*/ 51 } 52 53 -
branches/ai/src/world_entities/npcs/npc.h
r9869 r10041 4 4 5 5 #include "world_entity.h" 6 #include "ai_team_member.h" 6 7 7 8 class AI; 8 9 9 class NPC : public WorldEntity{10 class NPC : public AITeamMember { 10 11 ObjectListDeclaration(NPC); 11 12 public: -
branches/ai/src/world_entities/npcs/npc_test.cc
r9947 r10041 32 32 33 33 #include "class_id_DEPRECATED.h" 34 34 35 ObjectListDefinitionID(NPC2, CL_NPC_TEST2); 35 36 CREATE_FACTORY(NPC2); … … 42 43 43 44 44 if (root != NULL) 45 this->loadParams(root); 45 if (root != NULL)this->loadParams(root); 46 47 addToTeam(0); 46 48 } 47 49 … … 63 65 void NPC2::tick(float dt) 64 66 { 67 68 65 69 // animating the md2 model (uninteressant) 66 70 if( likely(this->getModel(0) != NULL)) 67 71 ((MD2Model*)this->getModel(0))->tick(dt); 68 72 69 73 return; 74 //this things will now be managed by the AI modules....///// 70 75 71 76 PRINTF(0)("====================\n");
Note: See TracChangeset
for help on using the changeset viewer.