Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5988 in orxonox.OLD


Ignore:
Timestamp:
Dec 8, 2005, 10:39:31 AM (18 years ago)
Author:
manuel
Message:

branch compiles again. factory problems solved

Location:
branches/powerups/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/powerups/src/lib/sound/sound_engine.cc

    r5985 r5988  
    289289  }
    290290  // INITIALIZING THE DEVICE:
    291   ALCchar deviceName[] =
     291  ALubyte deviceName[] =
    292292#ifdef __WIN32__
    293293      "Direct3D";
     
    300300  this->context = alcCreateContext(this->device, NULL);
    301301
    302   alcMakeContextCurrent(this->context); 
     302  alcMakeContextCurrent(this->context);
    303303
    304304  if ((result = alGetError()) != AL_NO_ERROR)
  • branches/powerups/src/world_entities/power_ups/weapon_power_up.cc

    r5986 r5988  
    4949void WeaponPowerUp::init()
    5050{
     51  weaponXML = NULL;
     52  weapon = NULL;
    5153}
    5254
     
    5658  static_cast<PowerUp*>(this)->loadParams(root);
    5759  const TiXmlElement* elem = root->FirstChildElement("weapon");
    58   if(elem != NULL && (elem = elem->getFirstChildElement()) != NULL)
     60  if(elem != NULL && (elem = elem->FirstChildElement()) != NULL)
    5961  {
    6062    this->weaponXML = elem;
     
    7577{
    7678  this->weapon = dynamic_cast<Weapon*>((weaponXML == NULL)
    77       ? Factory::getFirst()->fabricate(static_cast<ClassID>(this->weapon->getClassID()))
    78       : Factory::getFirst()->fabricate(weaponXML));
     79      ? Factory::fabricate(static_cast<ClassID>(this->weapon->getClassID()))
     80      : Factory::fabricate(weaponXML));
    7981}
    8082
    8183void WeaponPowerUp::setWeaponClass(const char* name)
    8284{
    83   this->weapon = dynamic_cast<Weapon*>(Factory::getFirst()->fabricate(name, name));
     85  this->weapon = dynamic_cast<Weapon*>(Factory::fabricate(name));
    8486}
     87
     88void WeaponPowerUp::hide()
     89{
     90  PowerUp::hide();
     91  this->createWeapon();
     92}
  • branches/powerups/src/world_entities/power_ups/weapon_power_up.h

    r5973 r5988  
    2222  void setWeaponClass(const char* name);
    2323
     24protected:
     25  void hide();
     26
    2427private:
    2528  void init();
  • branches/powerups/src/world_entities/space_ships/space_ship.cc

    r5985 r5988  
    419419{
    420420  if(powerUp->isA(CL_WEAPON_POWER_UP)) {
    421     Weapon weapon = dynamic_cast<WeaponPowerUp*>(powerUp)->getWeapon();
     421    Weapon* weapon = dynamic_cast<WeaponPowerUp*>(powerUp)->getWeapon();
    422422    WeaponManager* manager = this->getWeaponManager();
    423423    int slot = manager->getNextFreeSlot(0, weapon->getCapability());
Note: See TracChangeset for help on using the changeset viewer.