Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7264 in orxonox.OLD


Ignore:
Timestamp:
Apr 2, 2006, 4:51:19 PM (18 years ago)
Author:
bensch
Message:

shared_lib: compile again

Location:
branches/shared_lib
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • branches/shared_lib/Makefile.am

    r4976 r7264  
    11AUTOMAKE_OPTIONS = foreign no-installman no-installinfo
    22
    3 SUBDIRS = src
     3SUBDIRS = \
     4        src
    45
    56EXTRA_DIST = CODING-STANDARDS \
  • branches/shared_lib/autogen.sh

    r6274 r7264  
    5454#done
    5555
     56libtoolize --force
    5657#aclocal $ACLOCAL_FLAGS -I ./m4 || exit;
    5758aclocal-1.9 || aclocal || exit;
  • branches/shared_lib/config.h.in

    r6838 r7264  
    1818/* if we have CURL */
    1919#undef HAVE_CURL
     20
     21/* Define to 1 if you have the <dlfcn.h> header file. */
     22#undef HAVE_DLFCN_H
    2023
    2124/* Define to 1 if you have the <ffmpeg/avcodec.h> header file. */
  • branches/shared_lib/configure.ac

    r7256 r7264  
    4545#########################
    4646AC_PROG_CXX
    47 AC_PROG_RANLIB
     47AC_LIBTOOL_DLOPEN
     48AC_PROG_LIBTOOL
    4849AC_HEADER_STDC
    4950
     
    496497## CHECKING FOR HEADERS AND LIBS ##
    497498###################################
     499
     500AX_CHECK_REQUIRED_HEADER_LIB([ltdl.h], [ltdl], [main],,, [http://www.gnu.org/software/libtool])
    498501
    499502#---------#
  • branches/shared_lib/src/Makefile.am

    r7151 r7264  
    22include $(MAINSRCDIR)/defs/include_paths.am
    33
    4 include world_entities/WorldEntities.am
    54include story_entities/Makefile.am
    65
     
    1211bin_PROGRAMS = orxonox
    1312
    14 orxonox_CPPFLAGS = -DIS_ORXONOX
    15 orxonox_LDFLAGS = -u global_ModelParticles_Factory
     13orxonox_CPPFLAGS = -DIS_ORXONOX -DPKG_LIBDIR="\"$(pkglibdir)\""
     14orxonox_LDFLAGS = --export-dynamic
     15##-ldl -rdynamic
    1616
    1717orxonox_DEPENDENCIES = \
     
    2727
    2828orxonox_SOURCES = \
    29                 $(WorldEntities_SOURCES_) \
    3029                $(StoryEntities_SOURCES_) \
    3130                orxonox.cc \
  • branches/shared_lib/src/defs/debug.h

    r7165 r7264  
    6868
    6969  // LOADING
    70   #define DEBUG_MODULE_LOAD                  2
     70  #define DEBUG_MODULE_LOADING               2
    7171  #define DEBUG_MODULE_IMPORTER              2
    7272
  • branches/shared_lib/src/lib/BuildLibs.am

    r7256 r7264  
    44                $(LIB_PREFIX)/gui/gtk_gui/libORXgui.a \
    55                $(LIB_PREFIX)/gui/gl_gui/libORXglgui.a \
    6                 $(LIB_PREFIX)/graphics/importer/libORXimporter.a \
     6                $(LIB_PREFIX)/graphics/importer/libORXimporter.la \
    77                $(LIB_PREFIX)/graphics/libORXgraphics.a \
    8                 $(LIB_PREFIX)/graphics/importer/libtc.a \
    98                $(LIB_PREFIX)/sound/libORXsound.a \
    109                $(LIB_PREFIX)/event/libORXevent.a \
  • branches/shared_lib/src/lib/graphics/Makefile.am

    r7165 r7264  
    44noinst_LIBRARIES = libORXgraphics.a
    55
    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
     6libORXgraphics_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
    2122
    2223
    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
     24noinst_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
    3941
    4042
  • branches/shared_lib/src/lib/graphics/importer/Makefile.am

    r6532 r7264  
    22include $(MAINSRCDIR)/defs/include_paths.am
    33
    4 noinst_LIBRARIES = libORXimporter.a libtc.a
     4pkglib_LTLIBRARIES = libORXimporter.la
    55
    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
     6libORXimporter_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
    1921
    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
     22noinst_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  
    1717
    1818#include "dynamic_loader.h"
    19 
    20 
    21 #include <dlfcn.h>
    22 
     19#include "resource_manager.h"
    2320
    2421using namespace std;
    25 
    2622
    2723/**
     
    3026*/
    3127DynamicLoader::DynamicLoader (const std::string& libName)
    32     : Factory(NULL, CL_NULL)
    3328{
    3429  this->setClassID(CL_DYNAMIC_LOADER, "DynamicLoader");
     
    4035}
    4136
     37/**
     38 * @brief initializes the Dynamic Library loader
     39 * @returns true on succes, false otherwise
     40 */
     41bool 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}
    4251
    4352/**
     
    4857  // delete what has to be deleted here
    4958  if (this->handle != NULL)
    50     dlclose(this->handle);
     59    lt_dlclose(this->handle);
    5160}
    5261
     
    5463bool DynamicLoader::loadDynamicLib(const std::string& libName)
    5564{
    56   this->handle = dlopen(&libName[0], RTLD_NOW);
     65  DynamicLoader::initialize();
     66
     67  this->handle = lt_dlopen(&libName[0]);
    5768  if(this->handle == NULL)
    5869  {
    5970    return false;
    6071  }
    61   void *mkr = dlsym( this->handle, "maker");
    6272}
    6373
    6474bool DynamicLoader::loadDyLib(const std::string& libName)
    6575{
     76  DynamicLoader::initialize();
     77
    6678  void* handle;
    67   handle = dlopen(&libName[0], RTLD_NOW);
     79  handle = lt_dlopen(libName.c_str());
    6880  if(handle == NULL)
    6981  {
    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
    7184    return false;
    7285  }
    73 //  void *mkr = dlsym("maker");
     86
     87}
     88
     89void 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 */
     100bool 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
     114bool DynamicLoader::addSearchDirInLibDir(const std::string& relSearchDir)
     115{
    74116
    75117}
    76118
    77119
    78 BaseObject* DynamicLoader::fabricateObject(const TiXmlElement* root) const
     120const char* DynamicLoader::getSearchDir()
    79121{
     122  return lt_dlgetsearchpath();
    80123}
  • branches/shared_lib/src/lib/util/loading/dynamic_loader.h

    r7193 r7264  
    88
    99#include "util/loading/factory.h"
     10#include <ltdl.h>
    1011
    1112#include <string>
    12 
    13 #define DYNAMIC_LINKAGE_FACTORY(CLASS_NAME, CLASS_ID) \
    14           void* DynamicCreator(const TiXmlElement* root) { return new CLASS_NAME(root); };
    1513
    1614// FORWARD DECLARATION
    1715
    1816//! A class for ...
    19 class DynamicLoader : public Factory
     17class DynamicLoader : public BaseObject
    2018{
    2119
     
    2523
    2624  bool loadDynamicLib(const std::string& libName);
    27   virtual BaseObject* fabricateObject(const TiXmlElement* root = NULL) const;
    2825
    2926  static bool loadDyLib(const std::string& libName);
    3027
     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();
     34private:
     35  // will be done automatically when using the this Engine.
     36  static bool initialize();
    3137
    3238private:
    33   void*      handle;
     39  lt_dlhandle      handle;
    3440};
    3541
  • branches/shared_lib/src/lib/util/loading/resource_manager.cc

    r7225 r7264  
    881881
    882882
     883
     884
    883885/**
    884886 * @param fileName the Name of the File to check
     
    921923  return ResourceManager::getInstance()->_cwd;
    922924}
    923 
    924925
    925926/**
  • branches/shared_lib/src/orxonox.cc

    r7261 r7264  
    5454
    5555#include "util/loading/load_param_description.h"
     56#include "util/loading/dynamic_loader.h"
    5657
    5758#include "network_manager.h"
     
    292293    NetworkManager::getInstance()->establishConnection(this->serverName, port);
    293294  }
    294   else if( this->port > 0) {    // we are a server
     295  else if( this->port > 0)
     296  {    // we are a server
    295297    State::setOnline(true);
    296298    NetworkManager::getInstance()->createServer(port);
     
    300302
    301303#include "util/loading/dynamic_loader.h"
    302 
    303304/**
    304305 * initializes and loads resource files
     
    340341  ResourceManager::getInstance()->addImageDir(imageDir);
    341342
    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());
    343360
    344361  // start the collision detection engine
     
    417434{
    418435  CmdLinePrefsReader prefs;
    419  
     436
    420437  IniFilePrefsReader ini(ResourceManager::homeDirCheck(DEFAULT_CONFIG_FILE));
    421  
     438
    422439  prefs.parse(argc, argv);
    423  
     440
    424441  if ( Preferences::getInstance()->getString("misc", "showLicenseAndExit", "") == "1" )
    425442  {
     
    427444    return 0;
    428445  }
    429  
     446
    430447  if( Preferences::getInstance()->getString("game", "showGui", "") == "1" )
    431448    showGui = true;
     
    433450           Preferences::getInstance()->getString( "game", "gameType", "" ) == "multiplayer_client" )
    434451    return startNetworkOrxonox(argc, argv);
    435  
     452
    436453  return startOrxonox(argc, argv, "", -1);
    437454  return 0;
     
    449466
    450467  std::string gameType = Preferences::getInstance()->getString( "game", "gameType", "" );
    451  
     468
    452469  if ( gameType == "multiplayer_client" )
    453470  {
    454471    int port = Preferences::getInstance()->getInt( "game", "port", DEFAULT_ORXONOX_PORT );
    455472    std::string host = Preferences::getInstance()->getString( "game", "host", "" );
    456    
     473
    457474    if ( host == "" )
    458475    {
     
    460477      return 1;
    461478    }
    462    
     479
    463480    printf("Starting Orxonox as client: connecting to %s, on port %i\n", host.c_str(), port);
    464    
     481
    465482    startOrxonox(argc, argv, host.c_str(), port);
    466483  }
     
    468485  {
    469486    int port = Preferences::getInstance()->getInt( "game", "port", DEFAULT_ORXONOX_PORT );
    470    
     487
    471488    printf("Starting Orxonox as server: listening on port %i\n", port);
    472    
     489
    473490    startOrxonox(argc, argv, "", port);
    474491  }
  • branches/shared_lib/src/subprojects/collision_detection/Makefile.am

    r7191 r7264  
    44LIB_PREFIX=$(MAINSRCDIR)/lib
    55include $(MAINSRCDIR)/lib/BuildLibs.am
    6 
    76
    87bin_PROGRAMS = collision
     
    2120                $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
    2221
    23 
    2422collision_CPPFLAGS =  \
    2523                -DGUI_MODULE   \
  • branches/shared_lib/src/util/Makefile.am

    r7221 r7264  
    33
    44noinst_LIBRARIES = libORXutils.a
     5
     6INCLUDES = $(LTDLINCL)
     7
    58
    69libORXutils_a_SOURCES = fast_factory.cc \
     
    2023                        track/track_node.cc
    2124
     25
    2226noinst_HEADERS =        fast_factory.h \
    2327                        object_manager.h \
  • branches/shared_lib/src/world_entities/Makefile.am

    r7155 r7264  
    11MAINSRCDIR=..
    22include $(MAINSRCDIR)/defs/include_paths.am
    3 include WorldEntities.am
    43
    54noinst_LIBRARIES = libORXwe.a
     5
     6## TODO ::
     7WRONG_SORTED_SOURCES_ = space_ships/space_ship.cc
     8
    69
    710## THESE ARE THE BASE CLASSES OF ALL WORLD_ENTITIES
     
    2730                spawning_point.cc \
    2831                \
     32                skybox.cc \
     33                terrain.cc \
    2934                \
    30                 effects/explosion.cc
     35                elements/image_entity.cc \
     36                elements/text_element.cc \
     37                \
     38                effects/explosion.cc \
     39                \
     40                $(WRONG_SORTED_SOURCES_)
    3141
     42LDFLAGS = --export-dynamic -module
     43
     44pkglib_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
     57libORXplayables_la_SOURCES = \
     58                space_ships/helicopter.cc \
     59                space_ships/hover.cc \
     60                space_ships/turbine_hover.cc \
     61                creatures/md2_creature.cc
     62
     63libORXweapons_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
     72libORXprojectiles_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
     80libORXpower_ups_la_SOURCES = \
     81                power_ups/turret_power_up.cc \
     82                power_ups/laser_power_up.cc
     83
     84
     85libORXnpcs_la_SOURCES = \
     86                npcs/ground_turret.cc \
     87                npcs/npc_test.cc \
     88                npcs/npc_test1.cc
     89
     90libORXenvironmentals_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
     105libORXmisc_entities_la_SOURCES = \
     106                \
     107                effects/lightning_bolt.cc
    32108
    33109
     
    57133                effects/explosion.h \
    58134                \
    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
    60182
    61 
    62 EXTRA_DIST = WorldEntities.am
  • branches/shared_lib/src/world_entities/WorldEntities.am

    r7167 r7264  
    33                world_entities/npcs/npc_test1.cc \
    44                world_entities/npcs/npc_test.cc \
    5                 world_entities/npcs/ground_turret.cc \
    65                \
    76                world_entities/environment.cc \
     
    5150
    5251
    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  
    2020
    2121#include "weapons/weapon_manager.h"
    22 #include "weapons/test_gun.h"
    23 #include "weapons/turret.h"
    24 #include "weapons/cannon.h"
    2522
    2623#include "util/loading/factory.h"
     
    8279
    8380  //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");
    8885  Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate(CL_CANNON));
    8986
    9087  cannon->setName("BFG");
    9188
    92   this->addWeapon(wpLeft, 1, 0);
    93   this->addWeapon(wpRight,1 ,1);
     89//  this->addWeapon(wpLeft, 1, 0);
     90//  this->addWeapon(wpRight,1 ,1);
    9491  this->addWeapon(cannon, 0, 6);
    9592
  • branches/shared_lib/src/world_entities/space_ships/hover.cc

    r7221 r7264  
    2020
    2121#include "weapons/weapon_manager.h"
    22 #include "weapons/test_gun.h"
    23 #include "weapons/turret.h"
    24 #include "weapons/cannon.h"
    2522
    2623#include "util/loading/factory.h"
     
    7471
    7572  //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);
    8784
    8885  this->getWeaponManager()->changeWeaponConfig(1);
  • branches/shared_lib/src/world_entities/space_ships/space_ship.cc

    r7221 r7264  
    124124
    125125  //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");
    130130  //Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate(CL_CANNON));
    131131
    132132  //cannon->setName("BFG");
    133133
    134   this->addWeapon(wpLeft, 1, 0);
    135   this->addWeapon(wpRight,1 ,1);
     134  //this->addWeapon(wpLeft, 1, 0);
     135  //this->addWeapon(wpRight,1 ,1);
    136136  //this->addWeapon(cannon, 0, 6);
    137137
  • branches/shared_lib/src/world_entities/space_ships/turbine_hover.cc

    r7221 r7264  
    2020
    2121#include "weapons/weapon_manager.h"
    22 #include "weapons/test_gun.h"
    23 #include "weapons/turret.h"
    24 #include "weapons/cannon.h"
    2522
    2623#include "util/loading/factory.h"
     
    7673
    7774  //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");
    8279  //Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate(CL_HYPERBLASTER));
    8380
    8481  //  cannon->setName("BFG");
    8582
    86   this->addWeapon(wpLeft, 1, 0);
    87   this->addWeapon(wpRight,1 ,1);
     83//  this->addWeapon(wpLeft, 1, 0);
     84//  this->addWeapon(wpRight,1 ,1);
    8885  //this->addWeapon(cannon, 0, 2);
    8986
Note: See TracChangeset for help on using the changeset viewer.