Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7221 in orxonox.OLD for trunk/src/world_entities/projectiles


Ignore:
Timestamp:
Mar 15, 2006, 3:10:45 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the std-branche back, it runs on windows and Linux

svn merge https://svn.orxonox.net/orxonox/branches/std . -r7202:HEAD

Location:
trunk/src/world_entities/projectiles
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/projectiles/projectile.cc

    r7193 r7221  
    6161
    6262
    63 void Projectile::loadExplosionSound(const char* explosionSound)
     63void Projectile::loadExplosionSound(const std::string& explosionSound)
    6464{
    6565  if (this->explosionBuffer != NULL)
    6666    ResourceManager::getInstance()->unload(this->explosionBuffer);
    6767
    68   else if (explosionSound != NULL)
     68  else if (!explosionSound.empty())
    6969  {
    7070    this->explosionBuffer = (SoundBuffer*)ResourceManager::getInstance()->load(explosionSound, WAV);
    7171    if (this->explosionBuffer != NULL)
    7272    {
    73       PRINTF(4)("Loaded sound %s to Pickup: %s.\n", explosionSound, this->getName());
     73      PRINTF(4)("Loaded sound %s to Pickup: %s.\n", explosionSound.c_str(), this->getName());
    7474    }
    7575    else
    7676    {
    77       PRINTF(2)("Failed to load sound %s to explosion %s.\n.", explosionSound, this->getName());
     77      PRINTF(2)("Failed to load sound %s to explosion %s.\n.", explosionSound.c_str(), this->getName());
    7878    }
    7979  }
     
    8383
    8484
    85 void Projectile::loadEngineSound(const char* engineSound)
     85void Projectile::loadEngineSound(const std::string& engineSound)
    8686{
    8787  if (this->engineBuffer != NULL)
    8888    ResourceManager::getInstance()->unload(this->engineBuffer);
    8989
    90   else if (engineSound != NULL)
     90  else if (!engineSound.empty())
    9191  {
    9292    this->engineBuffer = (SoundBuffer*)ResourceManager::getInstance()->load(engineSound, WAV);
    9393    if (this->engineBuffer != NULL)
    9494    {
    95       PRINTF(4)("Loaded sound %s to Pickup: %s.\n", engineSound, this->getName());
     95      PRINTF(4)("Loaded sound %s to Pickup: %s.\n", engineSound.c_str(), this->getName());
    9696    }
    9797    else
    9898    {
    99       PRINTF(2)("Failed to load sound %s to engine %s.\n.", engineSound, this->getName());
     99      PRINTF(2)("Failed to load sound %s to engine %s.\n.", engineSound.c_str(), this->getName());
    100100    }
    101101  }
  • trunk/src/world_entities/projectiles/projectile.h

    r7193 r7221  
    2626    void setLifeSpan(float lifeSpan);
    2727
    28     void loadExplosionSound(const char* explosionSound);
    29     void loadEngineSound(const char* engineSound);
     28    void loadExplosionSound(const std::string& explosionSound);
     29    void loadEngineSound(const std::string& engineSound);
    3030    void setMinEnergy(float energyMin);
    3131    /** @returns the minimal charched energy */
Note: See TracChangeset for help on using the changeset viewer.