- Timestamp:
- Jan 20, 2006, 12:08:41 AM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/material.cc
r6467 r6622 68 68 ResourceManager::getInstance()->unload(this->specularTexture); 69 69 } 70 71 Material& Material::operator=(const Material& m) 72 { 73 this->setIllum(m.illumModel); 74 this->setDiffuse(m.diffuse[0],m.diffuse[1],m.diffuse[2]); 75 this->setAmbient(m.ambient[0],m.ambient[1],m.ambient[2]); 76 this->setSpecular(m.specular[0],m.specular[1],m.specular[2]); 77 this->setShininess(m.shininess); 78 this->setTransparency(m.transparency); 79 80 if (this->diffuseTexture != NULL) 81 ResourceManager::getInstance()->unload(this->diffuseTexture); 82 if (m.diffuseTexture != NULL) 83 this->diffuseTexture = m.diffuseTexture; /// HACK shoudl be:(Texture*)ResourceManager::getInstance()->load(); 84 this->ambientTexture = NULL; /// FIXME 85 this->specularTexture = NULL; /// FIXME 86 87 this->setName(m.getName()); 88 } 89 70 90 71 91 /** … … 282 302 //! @todo check if RESOURCE MANAGER is availiable 283 303 //! @todo Textures from .mtl-file need special care. 284 if (dMap != NULL)304 if (dMap != NULL) 285 305 this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE, RP_GAME, (void*)&target); 286 306 else -
trunk/src/lib/graphics/importer/material.h
r6467 r6622 28 28 virtual ~Material (); 29 29 30 Material& operator=(const Material& material); 31 30 32 bool select () const; 31 33 32 34 void setIllum (int illum); 33 35 void setIllum (char* illum); 36 int getIllumModel() const { return this->illumModel; }; 34 37 void setDiffuse (float r, float g, float b); 35 38 void setDiffuse (char* rgb); … … 58 61 float shininess; //!< The shininess of the Material. 59 62 float transparency; //!< The transperency of the Material. 60 public: 63 61 64 Texture* diffuseTexture; //!< The diffuse texture of the Material. 62 65 Texture* ambientTexture; //!< The ambient texture of the Material. -
trunk/src/world_entities/projectiles/bomb.h
r6512 r6622 10 10 11 11 class FastFactory; 12 class ParticleSystem;12 class SpriteParticles; 13 13 class ParticleEmitter; 14 14 class Material; … … 39 39 private: 40 40 static FastFactory* fastFactory; 41 static ParticleSystem*trailParticles;42 static ParticleSystem*explosionParticles;41 static SpriteParticles* trailParticles; 42 static SpriteParticles* explosionParticles; 43 43 44 44 ParticleEmitter* emitter; -
trunk/src/world_entities/projectiles/guided_missile.cc
r6621 r6622 75 75 } 76 76 77 ParticleSystem* GuidedMissile::trailParticles = NULL;78 ParticleSystem* GuidedMissile::explosionParticles = NULL;77 SpriteParticles* GuidedMissile::trailParticles = NULL; 78 SpriteParticles* GuidedMissile::explosionParticles = NULL; 79 79 80 80 -
trunk/src/world_entities/projectiles/guided_missile.h
r6434 r6622 10 10 11 11 class Weapon; 12 class ParticleSystem;12 class SpriteParticles; 13 13 class ParticleEmitter; 14 14 class FastFactory; … … 34 34 private: 35 35 static FastFactory* fastFactory; 36 static ParticleSystem*trailParticles;37 static ParticleSystem*explosionParticles;36 static SpriteParticles* trailParticles; 37 static SpriteParticles* explosionParticles; 38 38 39 39 ParticleEmitter* emitter; -
trunk/src/world_entities/projectiles/laser.cc
r6621 r6622 71 71 } 72 72 73 ParticleSystem* Laser::explosionParticles = NULL;73 SpriteParticles* Laser::explosionParticles = NULL; 74 74 75 75 void Laser::activate() -
trunk/src/world_entities/projectiles/laser.h
r6434 r6622 11 11 class Vector; 12 12 class Weapon; 13 class ParticleSystem;13 class SpriteParticles; 14 14 class ParticleEmitter; 15 15 class FastFactory; … … 36 36 static FastFactory* fastFactory; 37 37 38 static ParticleSystem*explosionParticles;38 static SpriteParticles* explosionParticles; 39 39 40 40 ParticleEmitter* emitter; -
trunk/src/world_entities/projectiles/rocket.cc
r6621 r6622 74 74 } 75 75 76 ParticleSystem* Rocket::trailParticles = NULL;77 ParticleSystem* Rocket::explosionParticles = NULL;76 SpriteParticles* Rocket::trailParticles = NULL; 77 SpriteParticles* Rocket::explosionParticles = NULL; 78 78 79 79 void Rocket::activate() -
trunk/src/world_entities/projectiles/rocket.h
r6434 r6622 11 11 class Vector; 12 12 class Weapon; 13 class ParticleSystem;13 class SpriteParticles; 14 14 class ParticleEmitter; 15 15 class FastFactory; … … 35 35 private: 36 36 static FastFactory* fastFactory; 37 static ParticleSystem*trailParticles;38 static ParticleSystem*explosionParticles;37 static SpriteParticles* trailParticles; 38 static SpriteParticles* explosionParticles; 39 39 40 40 ParticleEmitter* emitter; -
trunk/src/world_entities/projectiles/test_bullet.cc
r6621 r6622 74 74 } 75 75 76 ParticleSystem* TestBullet::trailParticles = NULL;77 ParticleSystem* TestBullet::explosionParticles = NULL;76 SpriteParticles* TestBullet::trailParticles = NULL; 77 SpriteParticles* TestBullet::explosionParticles = NULL; 78 78 79 79 void TestBullet::activate() -
trunk/src/world_entities/projectiles/test_bullet.h
r6434 r6622 11 11 class Vector; 12 12 class Weapon; 13 class ParticleSystem;13 class SpriteParticles; 14 14 class ParticleEmitter; 15 15 class FastFactory; … … 35 35 private: 36 36 static FastFactory* fastFactory; 37 static ParticleSystem*trailParticles;38 static ParticleSystem*explosionParticles;37 static SpriteParticles* trailParticles; 38 static SpriteParticles* explosionParticles; 39 39 40 40 ParticleEmitter* emitter;
Note: See TracChangeset
for help on using the changeset viewer.