Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7264 in orxonox.OLD for branches/shared_lib/src/orxonox.cc


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

shared_lib: compile again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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  }
Note: See TracChangeset for help on using the changeset viewer.