Changeset 7264 in orxonox.OLD for branches/shared_lib/src
- Timestamp:
- Apr 2, 2006, 4:51:19 PM (19 years ago)
- Location:
- branches/shared_lib/src
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/shared_lib/src/Makefile.am
r7151 r7264 2 2 include $(MAINSRCDIR)/defs/include_paths.am 3 3 4 include world_entities/WorldEntities.am5 4 include story_entities/Makefile.am 6 5 … … 12 11 bin_PROGRAMS = orxonox 13 12 14 orxonox_CPPFLAGS = -DIS_ORXONOX 15 orxonox_LDFLAGS = -u global_ModelParticles_Factory 13 orxonox_CPPFLAGS = -DIS_ORXONOX -DPKG_LIBDIR="\"$(pkglibdir)\"" 14 orxonox_LDFLAGS = --export-dynamic 15 ##-ldl -rdynamic 16 16 17 17 orxonox_DEPENDENCIES = \ … … 27 27 28 28 orxonox_SOURCES = \ 29 $(WorldEntities_SOURCES_) \30 29 $(StoryEntities_SOURCES_) \ 31 30 orxonox.cc \ -
branches/shared_lib/src/defs/debug.h
r7165 r7264 68 68 69 69 // LOADING 70 #define DEBUG_MODULE_LOAD 70 #define DEBUG_MODULE_LOADING 2 71 71 #define DEBUG_MODULE_IMPORTER 2 72 72 -
branches/shared_lib/src/lib/BuildLibs.am
r7256 r7264 4 4 $(LIB_PREFIX)/gui/gtk_gui/libORXgui.a \ 5 5 $(LIB_PREFIX)/gui/gl_gui/libORXglgui.a \ 6 $(LIB_PREFIX)/graphics/importer/libORXimporter. a \6 $(LIB_PREFIX)/graphics/importer/libORXimporter.la \ 7 7 $(LIB_PREFIX)/graphics/libORXgraphics.a \ 8 $(LIB_PREFIX)/graphics/importer/libtc.a \9 8 $(LIB_PREFIX)/sound/libORXsound.a \ 10 9 $(LIB_PREFIX)/event/libORXevent.a \ -
branches/shared_lib/src/lib/graphics/Makefile.am
r7165 r7264 4 4 noinst_LIBRARIES = libORXgraphics.a 5 5 6 libORXgraphics_a_SOURCES = graphics_engine.cc \ 7 light.cc \ 8 shader.cc \ 9 \ 10 render2D/render_2d.cc \ 11 render2D/element_2d.cc \ 12 render2D/billboard.cc \ 13 \ 14 text_engine/text_engine.cc \ 15 text_engine/text.cc \ 16 text_engine/font.cc \ 17 \ 18 effects/graphics_effect.cc \ 19 effects/fog_effect.cc \ 20 effects/lense_flare.cc 6 libORXgraphics_a_SOURCES = \ 7 graphics_engine.cc \ 8 light.cc \ 9 shader.cc \ 10 \ 11 render2D/render_2d.cc \ 12 render2D/element_2d.cc \ 13 render2D/billboard.cc \ 14 \ 15 text_engine/text_engine.cc \ 16 text_engine/text.cc \ 17 text_engine/font.cc \ 18 \ 19 effects/graphics_effect.cc \ 20 effects/fog_effect.cc \ 21 effects/lense_flare.cc 21 22 22 23 23 noinst_HEADERS = graphics_engine.h \ 24 light.h \ 25 shader.h \ 26 \ 27 render2D/render_2d.h \ 28 render2D/element_2d.h \ 29 render2D/billboard.h \ 30 \ 31 text_engine/text_engine.h \ 32 text_engine/text.h \ 33 text_engine/font.h \ 34 text_engine/default_font.xpm \ 35 \ 36 effects/graphics_effect.h \ 37 effects/fog_effect.h \ 38 effects/lense_flare.h 24 noinst_HEADERS = \ 25 graphics_engine.h \ 26 light.h \ 27 shader.h \ 28 \ 29 render2D/render_2d.h \ 30 render2D/element_2d.h \ 31 render2D/billboard.h \ 32 \ 33 text_engine/text_engine.h \ 34 text_engine/text.h \ 35 text_engine/font.h \ 36 text_engine/default_font.xpm \ 37 \ 38 effects/graphics_effect.h \ 39 effects/fog_effect.h \ 40 effects/lense_flare.h 39 41 40 42 -
branches/shared_lib/src/lib/graphics/importer/Makefile.am
r6532 r7264 2 2 include $(MAINSRCDIR)/defs/include_paths.am 3 3 4 noinst_LIBRARIES = libORXimporter.a libtc.a4 pkglib_LTLIBRARIES = libORXimporter.la 5 5 6 libORXimporter_a_SOURCES = model.cc \ 7 vertex_array_model.cc \ 8 grid.cc \ 9 static_model.cc \ 10 objModel.cc \ 11 primitive_model.cc \ 12 md2Model.cc \ 13 material.cc \ 14 texture.cc \ 15 texture_sequence.cc \ 16 height_map.cc \ 17 media_container.cc \ 18 movie_player.cc 6 libORXimporter_la_SOURCES = \ 7 model.cc \ 8 tc.cc \ 9 vertex_array_model.cc \ 10 grid.cc \ 11 static_model.cc \ 12 objModel.cc \ 13 primitive_model.cc \ 14 md2Model.cc \ 15 material.cc \ 16 texture.cc \ 17 texture_sequence.cc \ 18 height_map.cc \ 19 media_container.cc \ 20 movie_player.cc 19 21 20 libtc_a_SOURCES = tc.cc 21 22 23 noinst_HEADERS = model.h \ 24 tc.h \ 25 vertex_array_model.h \ 26 grid.h \ 27 static_model.h \ 28 objModel.h \ 29 primitive_model.h \ 30 md2Model.h \ 31 material.h \ 32 texture.h \ 33 texture_sequence.h \ 34 height_map.h \ 35 anorms.h \ 36 anormtab.h \ 37 media_container.h \ 38 movie_player.h 22 noinst_HEADERS = \ 23 model.h \ 24 tc.h \ 25 vertex_array_model.h \ 26 grid.h \ 27 static_model.h \ 28 objModel.h \ 29 primitive_model.h \ 30 md2Model.h \ 31 material.h \ 32 texture.h \ 33 texture_sequence.h \ 34 height_map.h \ 35 anorms.h \ 36 anormtab.h \ 37 media_container.h \ 38 movie_player.h -
branches/shared_lib/src/lib/util/loading/dynamic_loader.cc
r7167 r7264 17 17 18 18 #include "dynamic_loader.h" 19 20 21 #include <dlfcn.h> 22 19 #include "resource_manager.h" 23 20 24 21 using namespace std; 25 26 22 27 23 /** … … 30 26 */ 31 27 DynamicLoader::DynamicLoader (const std::string& libName) 32 : Factory(NULL, CL_NULL)33 28 { 34 29 this->setClassID(CL_DYNAMIC_LOADER, "DynamicLoader"); … … 40 35 } 41 36 37 /** 38 * @brief initializes the Dynamic Library loader 39 * @returns true on succes, false otherwise 40 */ 41 bool DynamicLoader::initialize() 42 { 43 if (lt_dlinit () != 0) 44 { 45 PRINTF(1)("Initializing LT_DL_LIB: %s\n", lt_dlerror()); 46 return false; 47 } 48 else 49 return true; 50 } 42 51 43 52 /** … … 48 57 // delete what has to be deleted here 49 58 if (this->handle != NULL) 50 dlclose(this->handle);59 lt_dlclose(this->handle); 51 60 } 52 61 … … 54 63 bool DynamicLoader::loadDynamicLib(const std::string& libName) 55 64 { 56 this->handle = dlopen(&libName[0], RTLD_NOW); 65 DynamicLoader::initialize(); 66 67 this->handle = lt_dlopen(&libName[0]); 57 68 if(this->handle == NULL) 58 69 { 59 70 return false; 60 71 } 61 void *mkr = dlsym( this->handle, "maker");62 72 } 63 73 64 74 bool DynamicLoader::loadDyLib(const std::string& libName) 65 75 { 76 DynamicLoader::initialize(); 77 66 78 void* handle; 67 handle = dlopen(&libName[0], RTLD_NOW);79 handle = lt_dlopen(libName.c_str()); 68 80 if(handle == NULL) 69 81 { 70 PRINTF(0)("unable to load %s\n", &libName[0]); 82 PRINTF(1)("unable to load %s: %s\n", libName.c_str(), lt_dlerror()); 83 71 84 return false; 72 85 } 73 // void *mkr = dlsym("maker"); 86 87 } 88 89 void DynamicLoader::addSearchDir(const std::string& searchDir) 90 { 91 DynamicLoader::initialize(); 92 93 lt_dladdsearchdir(searchDir.c_str()); 94 } 95 96 /** 97 * @param relSearchDir: the Relative directory to add to searchPath of lt_dl 98 * @returns true if the Path was Valid, false otherwise 99 */ 100 bool DynamicLoader::addSearchDirRelative(const std::string& relSearchDir) 101 { 102 std::string absSearchDir = ResourceManager::getAbsDir(relSearchDir); 103 if (ResourceManager::isDir(absSearchDir)) 104 { 105 DynamicLoader::addSearchDir(absSearchDir); 106 return true; 107 } 108 else 109 { 110 return false; 111 } 112 } 113 114 bool DynamicLoader::addSearchDirInLibDir(const std::string& relSearchDir) 115 { 74 116 75 117 } 76 118 77 119 78 BaseObject* DynamicLoader::fabricateObject(const TiXmlElement* root) const 120 const char* DynamicLoader::getSearchDir() 79 121 { 122 return lt_dlgetsearchpath(); 80 123 } -
branches/shared_lib/src/lib/util/loading/dynamic_loader.h
r7193 r7264 8 8 9 9 #include "util/loading/factory.h" 10 #include <ltdl.h> 10 11 11 12 #include <string> 12 13 #define DYNAMIC_LINKAGE_FACTORY(CLASS_NAME, CLASS_ID) \14 void* DynamicCreator(const TiXmlElement* root) { return new CLASS_NAME(root); };15 13 16 14 // FORWARD DECLARATION 17 15 18 16 //! A class for ... 19 class DynamicLoader : public Factory17 class DynamicLoader : public BaseObject 20 18 { 21 19 … … 25 23 26 24 bool loadDynamicLib(const std::string& libName); 27 virtual BaseObject* fabricateObject(const TiXmlElement* root = NULL) const;28 25 29 26 static bool loadDyLib(const std::string& libName); 30 27 28 static void addSearchDir(const std::string& searchDir); 29 static bool addSearchDirRelative(const std::string& relSearchDir); 30 static bool addSearchDirInLibDir(const std::string& relSearchDir); 31 static const char* getSearchDir(); 32 33 static void unload(); 34 private: 35 // will be done automatically when using the this Engine. 36 static bool initialize(); 31 37 32 38 private: 33 void*handle;39 lt_dlhandle handle; 34 40 }; 35 41 -
branches/shared_lib/src/lib/util/loading/resource_manager.cc
r7225 r7264 881 881 882 882 883 884 883 885 /** 884 886 * @param fileName the Name of the File to check … … 921 923 return ResourceManager::getInstance()->_cwd; 922 924 } 923 924 925 925 926 /** -
branches/shared_lib/src/orxonox.cc
r7261 r7264 54 54 55 55 #include "util/loading/load_param_description.h" 56 #include "util/loading/dynamic_loader.h" 56 57 57 58 #include "network_manager.h" … … 292 293 NetworkManager::getInstance()->establishConnection(this->serverName, port); 293 294 } 294 else if( this->port > 0) { // we are a server 295 else if( this->port > 0) 296 { // we are a server 295 297 State::setOnline(true); 296 298 NetworkManager::getInstance()->createServer(port); … … 300 302 301 303 #include "util/loading/dynamic_loader.h" 302 303 304 /** 304 305 * initializes and loads resource files … … 340 341 ResourceManager::getInstance()->addImageDir(imageDir); 341 342 342 DynamicLoader::loadDyLib("libtest.so"); 343 if (!DynamicLoader::addSearchDirRelative("./world_entities")) 344 if (!DynamicLoader::addSearchDirRelative("./src/world_entities")) 345 DynamicLoader::addSearchDir(PKG_LIBDIR); 346 347 /// FIXME make this more modular (search for himself for all the libraries 348 printf("%s\n", DynamicLoader::getSearchDir()); 349 DynamicLoader::loadDyLib("libORXplayables.la"); 350 DynamicLoader::loadDyLib("libORXweapons.la"); 351 DynamicLoader::loadDyLib("libORXprojectiles.la"); 352 DynamicLoader::loadDyLib("libORXpower_ups.la"); 353 354 DynamicLoader::loadDyLib("libORXenvironmentals.la"); 355 356 DynamicLoader::loadDyLib("libORXnpcs"); 357 358 DynamicLoader::loadDyLib("libORXmisc_entities"); 359 printf("%s\n", DynamicLoader::getSearchDir()); 343 360 344 361 // start the collision detection engine … … 417 434 { 418 435 CmdLinePrefsReader prefs; 419 436 420 437 IniFilePrefsReader ini(ResourceManager::homeDirCheck(DEFAULT_CONFIG_FILE)); 421 438 422 439 prefs.parse(argc, argv); 423 440 424 441 if ( Preferences::getInstance()->getString("misc", "showLicenseAndExit", "") == "1" ) 425 442 { … … 427 444 return 0; 428 445 } 429 446 430 447 if( Preferences::getInstance()->getString("game", "showGui", "") == "1" ) 431 448 showGui = true; … … 433 450 Preferences::getInstance()->getString( "game", "gameType", "" ) == "multiplayer_client" ) 434 451 return startNetworkOrxonox(argc, argv); 435 452 436 453 return startOrxonox(argc, argv, "", -1); 437 454 return 0; … … 449 466 450 467 std::string gameType = Preferences::getInstance()->getString( "game", "gameType", "" ); 451 468 452 469 if ( gameType == "multiplayer_client" ) 453 470 { 454 471 int port = Preferences::getInstance()->getInt( "game", "port", DEFAULT_ORXONOX_PORT ); 455 472 std::string host = Preferences::getInstance()->getString( "game", "host", "" ); 456 473 457 474 if ( host == "" ) 458 475 { … … 460 477 return 1; 461 478 } 462 479 463 480 printf("Starting Orxonox as client: connecting to %s, on port %i\n", host.c_str(), port); 464 481 465 482 startOrxonox(argc, argv, host.c_str(), port); 466 483 } … … 468 485 { 469 486 int port = Preferences::getInstance()->getInt( "game", "port", DEFAULT_ORXONOX_PORT ); 470 487 471 488 printf("Starting Orxonox as server: listening on port %i\n", port); 472 489 473 490 startOrxonox(argc, argv, "", port); 474 491 } -
branches/shared_lib/src/subprojects/collision_detection/Makefile.am
r7191 r7264 4 4 LIB_PREFIX=$(MAINSRCDIR)/lib 5 5 include $(MAINSRCDIR)/lib/BuildLibs.am 6 7 6 8 7 bin_PROGRAMS = collision … … 21 20 $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS) 22 21 23 24 22 collision_CPPFLAGS = \ 25 23 -DGUI_MODULE \ -
branches/shared_lib/src/util/Makefile.am
r7221 r7264 3 3 4 4 noinst_LIBRARIES = libORXutils.a 5 6 INCLUDES = $(LTDLINCL) 7 5 8 6 9 libORXutils_a_SOURCES = fast_factory.cc \ … … 20 23 track/track_node.cc 21 24 25 22 26 noinst_HEADERS = fast_factory.h \ 23 27 object_manager.h \ -
branches/shared_lib/src/world_entities/Makefile.am
r7155 r7264 1 1 MAINSRCDIR=.. 2 2 include $(MAINSRCDIR)/defs/include_paths.am 3 include WorldEntities.am4 3 5 4 noinst_LIBRARIES = libORXwe.a 5 6 ## TODO :: 7 WRONG_SORTED_SOURCES_ = space_ships/space_ship.cc 8 6 9 7 10 ## THESE ARE THE BASE CLASSES OF ALL WORLD_ENTITIES … … 27 30 spawning_point.cc \ 28 31 \ 32 skybox.cc \ 33 terrain.cc \ 29 34 \ 30 effects/explosion.cc 35 elements/image_entity.cc \ 36 elements/text_element.cc \ 37 \ 38 effects/explosion.cc \ 39 \ 40 $(WRONG_SORTED_SOURCES_) 31 41 42 LDFLAGS = --export-dynamic -module 43 44 pkglib_LTLIBRARIES = \ 45 libORXplayables.la \ 46 libORXweapons.la \ 47 libORXprojectiles.la \ 48 libORXpower_ups.la \ 49 \ 50 libORXenvironmentals.la \ 51 \ 52 libORXnpcs.la \ 53 \ 54 libORXmisc_entities.la 55 56 57 libORXplayables_la_SOURCES = \ 58 space_ships/helicopter.cc \ 59 space_ships/hover.cc \ 60 space_ships/turbine_hover.cc \ 61 creatures/md2_creature.cc 62 63 libORXweapons_la_SOURCES = \ 64 weapons/turret.cc \ 65 weapons/aiming_turret.cc \ 66 weapons/targeting_turret.cc \ 67 weapons/cannon.cc \ 68 weapons/hyperblaster.cc \ 69 weapons/aim.cc\ 70 weapons/test_gun.cc 71 72 libORXprojectiles_la_SOURCES = \ 73 projectiles/bomb.cc \ 74 projectiles/laser.cc \ 75 projectiles/test_bullet.cc \ 76 projectiles/rocket.cc \ 77 projectiles/guided_missile.cc \ 78 projectiles/hyperblast.cc 79 80 libORXpower_ups_la_SOURCES = \ 81 power_ups/turret_power_up.cc \ 82 power_ups/laser_power_up.cc 83 84 85 libORXnpcs_la_SOURCES = \ 86 npcs/ground_turret.cc \ 87 npcs/npc_test.cc \ 88 npcs/npc_test1.cc 89 90 libORXenvironmentals_la_SOURCES = \ 91 environment.cc \ 92 skysphere.cc \ 93 satellite.cc \ 94 character_attributes.cc \ 95 test_entity.cc \ 96 planet.cc \ 97 environments/water.cc \ 98 environments/model_entity.cc \ 99 environments/building.cc \ 100 \ 101 movie_entity.cc \ 102 recorder.cc 103 104 105 libORXmisc_entities_la_SOURCES = \ 106 \ 107 effects/lightning_bolt.cc 32 108 33 109 … … 57 133 effects/explosion.h \ 58 134 \ 59 $(WorldEntities_HEADERS_) 135 \ 136 \ 137 npcs/npc_test.h \ 138 npcs/npc_test1.h \ 139 npcs/ground_turret.h \ 140 environment.h \ 141 skysphere.h \ 142 skybox.h \ 143 terrain.h \ 144 satellite.h \ 145 movie_entity.h \ 146 recorder.h \ 147 character_attributes.h \ 148 test_entity.h \ 149 planet.h \ 150 \ 151 weapons/test_gun.h \ 152 weapons/cannon.h \ 153 weapons/hyperblaster.h \ 154 weapons/turret.h \ 155 weapons/aiming_turret.h \ 156 weapons/targeting_turret.h \ 157 weapons/aim.h \ 158 \ 159 projectiles/bomb.h \ 160 projectiles/laser.h \ 161 projectiles/test_bullet.h \ 162 projectiles/rocket.h \ 163 projectiles/guided_missile.h \ 164 projectiles/hyperblast.h \ 165 \ 166 power_ups/turret_power_up.h \ 167 power_ups/laser_power_up.h \ 168 \ 169 space_ships/space_ship.h \ 170 space_ships/helicopter.h \ 171 space_ships/hover.h \ 172 space_ships/turbine_hover.h \ 173 creatures/md2_creature.h \ 174 \ 175 environments/water.h \ 176 environments/model_entity.h \ 177 environments/building.h \ 178 elements/image_entity.h \ 179 elements/text_element.h \ 180 \ 181 effects/lightning_bolt.h 60 182 61 62 EXTRA_DIST = WorldEntities.am -
branches/shared_lib/src/world_entities/WorldEntities.am
r7167 r7264 3 3 world_entities/npcs/npc_test1.cc \ 4 4 world_entities/npcs/npc_test.cc \ 5 world_entities/npcs/ground_turret.cc \6 5 \ 7 6 world_entities/environment.cc \ … … 51 50 52 51 53 WorldEntities_HEADERS_ = \54 npcs/npc_test.h \55 npcs/npc_test1.h \56 npcs/ground_turret.h \57 environment.h \58 skysphere.h \59 skybox.h \60 terrain.h \61 satellite.h \62 movie_entity.h \63 recorder.h \64 character_attributes.h \65 test_entity.h \66 planet.h \67 \68 weapons/test_gun.h \69 weapons/cannon.h \70 weapons/hyperblaster.h \71 weapons/turret.h \72 weapons/aiming_turret.h \73 weapons/targeting_turret.h \74 weapons/aim.h \75 \76 projectiles/bomb.h \77 projectiles/laser.h \78 projectiles/test_bullet.h \79 projectiles/rocket.h \80 projectiles/guided_missile.h \81 projectiles/hyperblast.h \82 \83 power_ups/turret_power_up.h \84 power_ups/laser_power_up.h \85 \86 space_ships/space_ship.h \87 space_ships/helicopter.h \88 space_ships/hover.h \89 space_ships/turbine_hover.h \90 creatures/md2_creature.h \91 \92 environments/water.h \93 environments/model_entity.h \94 environments/building.h \95 \96 elements/image_entity.h \97 elements/text_element.h \98 \99 effects/lightning_bolt.h -
branches/shared_lib/src/world_entities/space_ships/helicopter.cc
r7221 r7264 20 20 21 21 #include "weapons/weapon_manager.h" 22 #include "weapons/test_gun.h"23 #include "weapons/turret.h"24 #include "weapons/cannon.h"25 22 26 23 #include "util/loading/factory.h" … … 82 79 83 80 //weapons: 84 Weapon* wpRight = new TestGun(0);85 wpRight->setName("testGun Right");86 Weapon* wpLeft = new TestGun(1);87 wpLeft->setName("testGun Left");81 // Weapon* wpRight = new TestGun(0); 82 // wpRight->setName("testGun Right"); 83 // Weapon* wpLeft = new TestGun(1); 84 // wpLeft->setName("testGun Left"); 88 85 Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate(CL_CANNON)); 89 86 90 87 cannon->setName("BFG"); 91 88 92 this->addWeapon(wpLeft, 1, 0);93 this->addWeapon(wpRight,1 ,1);89 // this->addWeapon(wpLeft, 1, 0); 90 // this->addWeapon(wpRight,1 ,1); 94 91 this->addWeapon(cannon, 0, 6); 95 92 -
branches/shared_lib/src/world_entities/space_ships/hover.cc
r7221 r7264 20 20 21 21 #include "weapons/weapon_manager.h" 22 #include "weapons/test_gun.h"23 #include "weapons/turret.h"24 #include "weapons/cannon.h"25 22 26 23 #include "util/loading/factory.h" … … 74 71 75 72 //weapons: 76 Weapon* wpRight = new TestGun(0);77 wpRight->setName("testGun Right");78 Weapon* wpLeft = new TestGun(1);79 wpLeft->setName("testGun Left");80 Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate(CL_HYPERBLASTER));81 82 cannon->setName("BFG");83 84 this->addWeapon(wpLeft, 1, 0);85 this->addWeapon(wpRight,1 ,1);86 this->addWeapon(cannon, 0, 2);73 // Weapon* wpRight = new TestGun(0); 74 // wpRight->setName("testGun Right"); 75 // Weapon* wpLeft = new TestGun(1); 76 // wpLeft->setName("testGun Left"); 77 // Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate(CL_HYPERBLASTER)); 78 79 // cannon->setName("BFG"); 80 81 // this->addWeapon(wpLeft, 1, 0); 82 // this->addWeapon(wpRight,1 ,1); 83 // this->addWeapon(cannon, 0, 2); 87 84 88 85 this->getWeaponManager()->changeWeaponConfig(1); -
branches/shared_lib/src/world_entities/space_ships/space_ship.cc
r7221 r7264 124 124 125 125 //weapons: 126 Weapon* wpRight = new TestGun(0);127 wpRight->setName("testGun Right");128 Weapon* wpLeft = new TestGun(1);129 wpLeft->setName("testGun Left");126 //Weapon* wpRight = dynamic_cast<Weapon*>(Factory::fabricate("TestGun")); 127 //wpRight->setName("testGun Right"); 128 //Weapon* wpLeft = dynamic_cast<Weapon*>(Factory::fabricate("TestGun")); 129 //wpLeft->setName("testGun Left"); 130 130 //Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate(CL_CANNON)); 131 131 132 132 //cannon->setName("BFG"); 133 133 134 this->addWeapon(wpLeft, 1, 0);135 this->addWeapon(wpRight,1 ,1);134 //this->addWeapon(wpLeft, 1, 0); 135 //this->addWeapon(wpRight,1 ,1); 136 136 //this->addWeapon(cannon, 0, 6); 137 137 -
branches/shared_lib/src/world_entities/space_ships/turbine_hover.cc
r7221 r7264 20 20 21 21 #include "weapons/weapon_manager.h" 22 #include "weapons/test_gun.h"23 #include "weapons/turret.h"24 #include "weapons/cannon.h"25 22 26 23 #include "util/loading/factory.h" … … 76 73 77 74 //weapons: 78 Weapon* wpRight = new TestGun(0);79 wpRight->setName("testGun Right");80 Weapon* wpLeft = new TestGun(1);81 wpLeft->setName("testGun Left");75 // Weapon* wpRight = new TestGun(0); 76 // wpRight->setName("testGun Right"); 77 // Weapon* wpLeft = new TestGun(1); 78 // wpLeft->setName("testGun Left"); 82 79 //Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate(CL_HYPERBLASTER)); 83 80 84 81 // cannon->setName("BFG"); 85 82 86 this->addWeapon(wpLeft, 1, 0);87 this->addWeapon(wpRight,1 ,1);83 // this->addWeapon(wpLeft, 1, 0); 84 // this->addWeapon(wpRight,1 ,1); 88 85 //this->addWeapon(cannon, 0, 2); 89 86
Note: See TracChangeset
for help on using the changeset viewer.