- Timestamp:
- Jan 30, 2007, 9:17:21 PM (18 years ago)
- Location:
- trunk/src
- Files:
-
- 19 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/hud.cc
r10449 r10516 515 515 pos.x -= ySize; 516 516 //PRINTF(0)("secweaponwidget y-size: %f/n", (*weaponWidget)->getSizeY2D()); 517 (*weaponWidget)->setAbsCoor2D(pos.x +this->rightRect->getAbsCoor2D().x, pos.y);517 (*weaponWidget)->setAbsCoor2D(pos.x, pos.y);//+this->rightRect->getAbsCoor2D().x, pos.y); 518 518 (*weaponWidget)->show(); 519 519 //printf("update thing %s::%s\n", (*weaponWidget)->getClassCName(), (*weaponWidget)->getName()); -
trunk/src/world_entities/WorldEntities.am
r10453 r10516 34 34 \ 35 35 world_entities/questGUI/quest_gui.cc \ 36 36 world_entities/questGUI/quest.cc \ 37 37 \ 38 38 world_entities/weapons/weapon_slot.cc \ -
trunk/src/world_entities/elements/glgui_energywidgetvertical.cc
r10421 r10516 64 64 this->_image->setWidgetSize(30,30); 65 65 this->_image->setForegroundColor(Color(1,1,1,0.6)); 66 this->_image->setBackgroundTexture(Texture()); 66 67 this->_image->setBackgroundColor(Color(1,1,1,0)); 67 this->_image->setBackgroundTexture(Texture());68 68 this->_image->loadImageFromFile("textures/evil-flower.png"); 69 69 //this->_image.setRelCoor2D(borderLeft(), borderTop() + this->_bar.getSizeX2D()); -
trunk/src/world_entities/elements/glgui_radar.cc
r10368 r10516 41 41 { 42 42 this->setBackgroundTexture("textures/gui/gui_radar.png"); 43 this->setBackgroundColor(Color(1.0,1.0,1.0,0.5)); 43 44 44 45 this->_updateInterval = .01f; -
trunk/src/world_entities/particles/particle_system.cc
r10515 r10516 136 136 if (emitter->isA(ParticleEmitter::staticClassID())) 137 137 { 138 // init the emitertter with the coordinates of the system139 dynamic_cast<ParticleEmitter*>(emitter)->setAbsCoor(this->getAbsCoor());140 138 this->addEmitter(dynamic_cast<ParticleEmitter*>(emitter)); 141 139 } -
trunk/src/world_entities/player.cc
r10368 r10516 100 100 //this->_hud.updateWeaponManager(); 101 101 102 if (dynamic_cast<SpaceShip*>(this->playable) != 0)103 104 105 102 if (dynamic_cast<SpaceShip*>(this->playable) != NULL) 103 this->_hud.setWeaponManager(&this->playable->getWeaponManager(), &dynamic_cast<SpaceShip*>(this->playable)->getWeaponManagerSecondary()); 104 else 105 this->_hud.setWeaponManager(&this->playable->getWeaponManager()); 106 106 } 107 107 -
trunk/src/world_entities/space_ships/space_ship.cc
r10512 r10516 174 174 Weapon* cannon = new SwarmLauncher(); 175 175 cannon->setName( "SwarmLauncher"); 176 176 /* 177 177 Weapon* spike = new SpikeThrower(); 178 178 spike->setName( "SpikeThrower" ); … … 183 183 184 184 Weapon* acid1 = new AcidLauncher(); 185 acid1->setName( "AcidSplasher" ); 185 acid1->setName( "AcidSplasher" );*/ 186 186 187 187 … … 194 194 this->weaponMan.addWeapon( wpLeft3, 2, 4); 195 195 this->weaponMan.addWeapon( wpRight3, 2, 5); 196 /* 196 197 197 this->weaponMan.addWeapon( wpLeft1, 3, 0); 198 198 this->weaponMan.addWeapon( wpRight1, 3, 1); … … 203 203 this->weaponMan.addWeapon( wpLeft3, 3, 4); 204 204 this->weaponMan.addWeapon( wpRight3, 3, 5); 205 */ 206 207 this->weaponMan.addWeapon( acid0, 3, 0);208 this->weaponMan.addWeapon( acid1, 3, 1);205 206 207 // this->weaponMan.addWeapon( acid0, 3, 0); 208 // this->weaponMan.addWeapon( acid1, 3, 1); 209 209 210 210 211 211 this->secWeaponMan.addWeapon( cannon, 0, 2); 212 this->secWeaponMan.addWeapon( spike, 1, 3);212 // this->secWeaponMan.addWeapon( spike, 1, 3); 213 213 // this->secWeaponMan.addWeapon( acid0, 2, 2); 214 214 // this->secWeaponMan.addWeapon( acid1, 2, 3); 215 215 216 216 217 this->weaponMan.changeWeaponConfig(3); 218 this->secWeaponMan.changeWeaponConfig(1); 217 this->weaponMan.changeWeaponConfig(0); 218 this->secWeaponMan.changeWeaponConfig(0); 219 219 220 220 221 curWeaponPrimary = 0; 221 curWeaponSecondary = 1;222 curWeaponSecondary = 0; 222 223 223 224 Playable::weaponConfigChanged(); … … 226 227 227 228 weaponEnergyRegen = 10; // 10 einheiten pro Sekunde 228 engineSpeedBase = 5;229 engineSpeedBase = 15; 229 230 shieldRegen = 2; 230 231 … … 246 247 247 248 248 /* this->loadModel("models/ships/mantawing.obj");*/ 249 this->loadModel("models/spaceships/human_spaceship_fighter.obj", .25); 249 250 //this->setVisibiliy(false); 250 251 … … 1087 1088 void SpaceShip::previousWeaponConfig() 1088 1089 { 1090 /* 1089 1091 this->curWeaponPrimary = (this->curWeaponPrimary + 1) % 3; 1090 1092 this->weaponMan.changeWeaponConfig(this->curWeaponPrimary); 1093 */ 1094 this->weaponMan.previousWeaponConfig(); 1091 1095 Playable::weaponConfigChanged(); 1092 1096 } -
trunk/src/world_entities/space_ships/space_ship.h
r10368 r10516 82 82 void setPlaymodeXML(const std::string& playmode); //recieves the playmode from a string (useful for script implementation) 83 83 void setActionWidthPercentage(int i); 84 void setTravelSpeed(float f); 84 85 void updateTravelDistance(); 85 86 virtual void movement (float dt); -
trunk/src/world_entities/weapons/acid_launcher.cc
r10419 r10516 32 32 33 33 #include "util/loading/factory.h" 34 35 #include "elements/glgui_energywidgetvertical.h" 34 36 35 37 … … 122 124 void AcidLauncher::tick(float dt) 123 125 { 126 if (this->energyWidget != NULL && !this->isEnergyWidgetInitialized) 127 { 128 this->energyWidget->setDisplayedImage("textures/gui/gui_acid.png"); 129 this->isEnergyWidgetInitialized = true; 130 } 131 124 132 if (!Weapon::tickW(dt)) 125 133 return; -
trunk/src/world_entities/weapons/heavy_blaster.cc
r10499 r10516 10 10 11 11 #include "loading/fast_factory.h" 12 13 #include "elements/glgui_energywidgetvertical.h" 12 14 13 15 CREATE_FACTORY(HeavyBlaster); … … 93 95 94 96 this->setActionSound(WA_SHOOT, "sounds/guns/laser.wav"); 95 this->setActionSound(WA_ACTIVATE, "sounds/voices/lasers.wav");97 // this->setActionSound(WA_ACTIVATE, "sounds/voices/lasers.wav"); 96 98 this->setActionSound(WA_RELOAD, "sounds/spawn/alien_generator.wav"); 97 99 98 100 this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL | WTYPE_LIGHT); 99 this->setProjectileTypeC("HBolt"); // FIXME temp project type until the blaste class exist 100 // this->setProjectileTypeC("SpikeBall"); // FIXME temp project type until the blaste class exist 101 this->setProjectileTypeC("HBolt"); 101 102 this->prepareProjectiles(5); 102 103 … … 104 105 this->setSegs(2); 105 106 this->activeBarrel = 0; 106 // this->init2();107 107 108 108 … … 239 239 glPushMatrix(); 240 240 glTranslatef (this->objComp[0][0]->getAbsCoor().x, this->objComp[0][0]->getAbsCoor().y, this->objComp[0][0]->getAbsCoor().z); 241 static_cast<StaticModel*>(this->getModel())->draw(2); 242 glPopMatrix(); 243 244 glPushMatrix(); 245 glTranslatef (this->objComp[1][0]->getAbsCoor().x, this->objComp[1][0]->getAbsCoor().y, this->objComp[1][0]->getAbsCoor().z); 246 static_cast<StaticModel*>(this->getModel())->draw(3); 247 glPopMatrix(); 248 249 glPushMatrix(); 250 glTranslatef (this->objComp[2][0]->getAbsCoor().x, this->objComp[2][0]->getAbsCoor().y, this->objComp[2][0]->getAbsCoor().z); 241 251 static_cast<StaticModel*>(this->getModel())->draw(1); 242 glPopMatrix();243 244 glPushMatrix();245 glTranslatef (this->objComp[1][0]->getAbsCoor().x, this->objComp[1][0]->getAbsCoor().y, this->objComp[1][0]->getAbsCoor().z);246 static_cast<StaticModel*>(this->getModel())->draw(2);247 glPopMatrix();248 249 glPushMatrix();250 glTranslatef (this->objComp[2][0]->getAbsCoor().x, this->objComp[2][0]->getAbsCoor().y, this->objComp[2][0]->getAbsCoor().z);251 static_cast<StaticModel*>(this->getModel())->draw(0);252 252 glPopMatrix(); 253 253 … … 264 264 glPushMatrix(); 265 265 glTranslatef (this->objComp[2][1]->getAbsCoor().x, this->objComp[2][1]->getAbsCoor().y, this->objComp[2][1]->getAbsCoor().z); 266 static_cast<StaticModel*>(this->getModel())->draw(3); 267 glPopMatrix(); 268 269 glPopMatrix(); 270 } 266 static_cast<StaticModel*>(this->getModel())->draw(0); 267 glPopMatrix(); 268 269 glPopMatrix(); 270 } 271 272 void HeavyBlaster::tick(float dt) 273 { 274 if (this->energyWidget != NULL && !this->isEnergyWidgetInitialized) 275 { 276 this->energyWidget->setDisplayedImage("textures/gui/gui_heavy_bolt.png"); 277 this->setEnergyWidgetInitialized(true); 278 } 279 } -
trunk/src/world_entities/weapons/heavy_blaster.h
r10499 r10516 29 29 virtual void fire(); 30 30 31 virtual void tick(float dt); 32 31 33 virtual void draw() const; 32 34 -
trunk/src/world_entities/weapons/light_blaster.cc
r10471 r10516 10 10 11 11 #include "loading/fast_factory.h" 12 13 #include "elements/glgui_energywidgetvertical.h" 12 14 13 15 CREATE_FACTORY(LightBlaster); … … 43 45 delete [] this->shootAnim; 44 46 delete [] this->objComp; 45 /*46 for(int j = 0; j < this->getSegs(); j++)47 {48 delete this->shootAnim[i][j];49 delete this->objComp[i][j];50 }51 delete this->shootAnim[i];52 delete this->objComp[i];53 delete this->emissionPoint[i];54 }*/55 47 56 // this->deconstr();57 // model will be deleted from WorldEntity-destructor58 48 } 59 49 … … 79 69 80 70 this->setActionSound(WA_SHOOT, "sounds/guns/laser.wav"); 81 this->setActionSound(WA_ACTIVATE, "sounds/voices/lasers.wav");71 // this->setActionSound(WA_ACTIVATE, "sounds/voices/lasers.wav"); 82 72 this->setActionSound(WA_RELOAD, "sounds/spawn/alien_generator.wav"); 83 73 84 74 this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL | WTYPE_LIGHT); 85 //this->setProjectileTypeC("RailProjectile"); // FIXME temp project type until the blaste class exist 86 this->setProjectileTypeC("LBolt"); // Working; FIXME: add textures 87 // this->setProjectileTypeC("Spike"); // Working; FIXME: add textures 75 this->setProjectileTypeC("LBolt"); 88 76 this->prepareProjectiles(100); 89 77 … … 137 125 } 138 126 139 140 127 void LightBlaster::fire() 141 128 { … … 187 174 static_cast<StaticModel*>(this->getModel())->draw(); 188 175 glPopMatrix(); 176 189 177 } 178 179 void LightBlaster::tick(float dt) 180 { 181 if (this->energyWidget != NULL && !this->isEnergyWidgetInitialized) 182 { 183 this->energyWidget->setDisplayedImage("textures/gui/gui_light_bolt.png"); 184 this->setEnergyWidgetInitialized(true); 185 } 186 } -
trunk/src/world_entities/weapons/light_blaster.h
r10368 r10516 26 26 virtual void fire(); 27 27 28 virtual void tick(float dt); 29 28 30 virtual void draw() const; 29 31 -
trunk/src/world_entities/weapons/medium_blaster.cc
r10415 r10516 10 10 11 11 #include "loading/fast_factory.h" 12 13 #include "elements/glgui_energywidgetvertical.h" 12 14 13 15 // … … 138 140 } 139 141 142 140 143 /** 141 144 * this activates the weapon … … 158 161 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 159 162 160 static_cast<StaticModel*>(this->getModel())->draw( 2);163 static_cast<StaticModel*>(this->getModel())->draw(0); 161 164 162 165 glPushMatrix(); … … 167 170 glPushMatrix(); 168 171 glTranslatef (this->objComp[0][1]->getAbsCoor().x, this->objComp[0][1]->getAbsCoor().y, this->objComp[0][1]->getAbsCoor().z); 169 static_cast<StaticModel*>(this->getModel())->draw( 0);172 static_cast<StaticModel*>(this->getModel())->draw(2); 170 173 glPopMatrix(); 171 174 172 175 glPopMatrix(); 173 176 } 177 178 void MediumBlaster::tick(float dt) 179 { 180 if (this->energyWidget != NULL && !this->isEnergyWidgetInitialized) 181 { 182 this->energyWidget->setDisplayedImage("textures/gui/gui_medium_bold.png"); 183 this->setEnergyWidgetInitialized(true); 184 } 185 } -
trunk/src/world_entities/weapons/medium_blaster.h
r10368 r10516 26 26 virtual void fire(); 27 27 28 virtual void tick(float dt); 29 28 30 virtual void draw() const; 29 31 -
trunk/src/world_entities/weapons/spike_thrower.cc
r10419 r10516 34 34 35 35 #include "util/loading/factory.h" 36 37 #include "elements/glgui_energywidgetvertical.h" 36 38 37 39 … … 125 127 void SpikeThrower::tick(float dt) 126 128 { 129 if (this->energyWidget != NULL && !this->isEnergyWidgetInitialized) 130 { 131 this->energyWidget->setDisplayedImage("textures/gui/gui_spikeball.png"); 132 this->isEnergyWidgetInitialized = true; 133 } 134 127 135 if (!Weapon::tickW(dt)) 128 136 return; -
trunk/src/world_entities/weapons/swarm_launcher.cc
r10419 r10516 33 33 34 34 #include "util/loading/factory.h" 35 36 #include "elements/glgui_energywidgetvertical.h" 35 37 36 38 … … 141 143 142 144 this->setAbsDirSoft(quat, 5); 145 146 if (this->energyWidget != NULL && !this->isEnergyWidgetInitialized) 147 { 148 this->energyWidget->setDisplayedImage("textures/gui/gui_swarm_missiles.png"); 149 this->setEnergyWidgetInitialized(true); 150 } 143 151 } 144 152 -
trunk/src/world_entities/weapons/weapon.cc
r10443 r10516 154 154 155 155 this->energyWidget = NULL; 156 isEnergyWidgetInitialized = false; 156 157 157 158 // set this object to be synchronized over network -
trunk/src/world_entities/weapons/weapon.h
r10443 r10516 190 190 inline int getPreferedSlot() { return this->preferedSlot; } 191 191 192 inline void setEnergyWidgetInitialized(bool b) {this->isEnergyWidgetInitialized = b;}; 193 192 194 193 195 protected: … … 207 209 208 210 void setPreferedSlot(int slot, int side) { this->preferedSlot = slot; this->preferedSide = side; } 211 212 //gui 213 OrxGui::GLGuiEnergyWidgetVertical* energyWidget; 214 bool isEnergyWidgetInitialized; 209 215 210 216 … … 238 244 float maxCharge; //!< The maximal energy to be loaded onto one projectile (this is only availible if chargeable is enabled) 239 245 240 OrxGui::GLGuiEnergyWidgetVertical* energyWidget;246 //OrxGui::GLGuiEnergyWidgetVertical* energyWidget; 241 247 242 248 PNode* defaultTarget; //!< A target for targeting Weapons.
Note: See TracChangeset
for help on using the changeset viewer.