Changeset 6405 for code/branches/pickup2/src/orxonox
- Timestamp:
- Dec 23, 2009, 8:27:17 PM (15 years ago)
- Location:
- code/branches/pickup2/src/orxonox
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup2/src/orxonox/CMakeLists.txt
r5929 r6405 46 46 ADD_SUBDIRECTORY(items) 47 47 ADD_SUBDIRECTORY(overlays) 48 ADD_SUBDIRECTORY(pickup)49 48 ADD_SUBDIRECTORY(sound) 50 49 ADD_SUBDIRECTORY(weaponsystem) … … 55 54 TOLUA_FILES 56 55 LevelManager.h 57 pickup/BaseItem.h58 pickup/PickupInventory.h59 56 DEFINE_SYMBOL 60 57 "ORXONOX_SHARED_BUILD" -
code/branches/pickup2/src/orxonox/OrxonoxPrereqs.h
r5929 r6405 117 117 class GametypeMessageListener; 118 118 class NotificationListener; 119 class Pickupable; 120 class PickupCarrier; 119 121 class PlayerTrigger; 120 122 class RadarListener; … … 133 135 class OrxonoxOverlay; 134 136 class OverlayGroup; 135 136 // pickup137 class BaseItem;138 class DroppedItem;139 class EquipmentItem;140 class ModifierPickup;141 class PassiveItem;142 class PickupCollection;143 class PickupInventory;144 class PickupSpawner;145 class UsableItem;146 // pickup, items147 class HealthImmediate;148 class HealthUsable;149 class Jump;150 137 151 138 //sound -
code/branches/pickup2/src/orxonox/interfaces/InterfaceCompilation.cc
r5929 r6405 34 34 35 35 #include "GametypeMessageListener.h" 36 #include "Pickupable.h" 37 #include "PickupCarrier.h" 36 38 #include "PlayerTrigger.h" 37 39 #include "RadarListener.h" … … 51 53 RegisterRootObject(GametypeMessageListener); 52 54 } 55 56 //---------------------------- 57 // Pickupable 58 //---------------------------- 59 Pickupable::Pickupable() 60 { 61 RegisterRootObject(Pickupable); 53 62 63 this->used_ = false; 64 this->owner_ = NULL; 65 } 66 67 //---------------------------- 68 // PickupCarrier 69 //---------------------------- 70 PickupCarrier::PickupCarrier() 71 { 72 RegisterRootObject(PickupCarrier); 73 } 74 75 //---------------------------- 76 // PlayerTrigger 77 //---------------------------- 78 PlayerTrigger::PlayerTrigger() 79 { 80 RegisterRootObject(PlayerTrigger); 81 82 this->player_ = NULL; 83 this->isForPlayer_ = true; 84 } 85 54 86 //---------------------------- 55 87 // RadarListener … … 83 115 RegisterRootObject(NotificationListener); 84 116 } 85 86 //----------------------------87 // PlayerTrigger88 //----------------------------89 PlayerTrigger::PlayerTrigger()90 {91 RegisterRootObject(PlayerTrigger);92 93 this->player_ = NULL;94 this->isForPlayer_ = true;95 }96 117 } -
code/branches/pickup2/src/orxonox/items/Engine.cc
r5929 r6405 35 35 #include "Scene.h" 36 36 #include "worldentities/pawns/SpaceShip.h" 37 #include "pickup/ModifierType.h" 37 //TODO: Remove. 38 //#include "pickup/ModifierType.h" 38 39 #include "tools/Shader.h" 39 40 … … 193 194 } 194 195 195 this->ship_->setAcceleration(this->ship_->getPickups().processModifiers(ModifierType::Acceleration, this->ship_->getOrientation() * acceleration, false)); 196 //TODO: Remove. 197 //this->ship_->setAcceleration(this->ship_->getPickups().processModifiers(ModifierType::Acceleration, this->ship_->getOrientation() * acceleration, false)); 196 198 197 199 if (!this->ship_->getPermanentBoost()) -
code/branches/pickup2/src/orxonox/pickup/CMakeLists.txt
r5781 r6405 1 1 ADD_SOURCE_FILES(ORXONOX_SRC_FILES 2 2 BaseItem.cc 3 DroppedItem.cc4 3 EquipmentItem.cc 5 4 ModifierPickup.cc … … 7 6 PickupCollection.cc 8 7 PickupInventory.cc 9 PickupSpawner.cc10 8 UsableItem.cc 11 9 ) -
code/branches/pickup2/src/orxonox/pickup/PickupCollection.cc
r5781 r6405 52 52 53 53 /** 54 @brief 55 Add an item to the collection. 56 57 Only adds the item if there's a free slot for it. 58 59 @param item Item to add to the collection. 60 @return Returns whether the item has been added to the collection. 54 @brief 55 Add an item to the collection. 56 57 Only adds the item if there's a free slot for it. 58 59 @param item 60 Item to add to the collection. 61 @return 62 Returns whether the item has been added to the collection. 61 63 */ 62 64 bool PickupCollection::add(BaseItem* item) -
code/branches/pickup2/src/orxonox/pickup/PickupCollection.h
r5947 r6405 50 50 @author Daniel 'Huty' Haggenmueller 51 51 */ 52 class _OrxonoxExport PickupCollection 52 class _OrxonoxExport PickupCollection : public orxonox::OrxonoxClass 53 53 { 54 54 public: 55 //TODO: Should probably be derived from OrxonoxClass???56 55 PickupCollection(); 57 56 … … 65 64 void remove(BaseItem* item, bool removeAllOfType = false); //!< Remove an item from the collection. 66 65 67 //TODO: What's up with that?66 //TODO: Hmm... probably should stay... 68 67 void useItem(); //!< Use the first usable item. 69 68 void useItem(UsableItem* item); //!< Use a usable item. 70 71 //TODO: This really shouldn't be here. It's nbot the Collections business to know about stuff like that.72 void addAdditiveModifier(ModifierType::Value type, float value); //!< Add an additive modifier.73 void addMultiplicativeModifier(ModifierType::Value type, float value); //!< Add a multiplicative modifier.74 75 float getAdditiveModifier(ModifierType::Value type); //!< Get total additive modifier.76 float getMultiplicativeModifier(ModifierType::Value type); //!< Get total multiplicative modifier.77 78 void removeAdditiveModifier(ModifierType::Value type, float value); //!< Remove an additive modifier.79 void removeMultiplicativeModifier(ModifierType::Value type, float value); //!< Remove a multiplicative modifier.80 81 float processModifiers(ModifierType::Value type, float inputValue, bool addBeforeMultiplication = false); //!< Apply the modifiers to a float.82 Vector3 processModifiers(ModifierType::Value type, Vector3 inputValue, bool addBeforeMultiplication = false); //!< Apply the modifiers to a Vector3.83 84 /**85 @brief Get the map of contained items.86 @return The map of items.87 */88 std::multimap<std::string, BaseItem*> getItems() const89 { return this->items_; }90 69 91 70 /** … … 110 89 std::deque<PassiveItem*> getPassiveItems(); //!< Get a list of passive items. 111 90 std::deque<UsableItem*> getUsableItems(); //!< Get a list of usable items. 91 112 92 private: 113 Pawn* owner_; 93 Pawn* owner_; //!< The owner of the PickupCollection. 114 94 UsableItem* currentUsable_; 115 116 bool bBlockRemovals_; //!< Whether to block direct removals through remove(). 117 118 std::multimap<ModifierType::Value, float> additiveModifiers_; //!< Contains additive modifiers (indexed by ModifierType). 119 std::multimap<ModifierType::Value, float> multiplicativeModifiers_; //!< Contains multiplicative modifiers (indexed by ModifierType). 95 int slots_; 120 96 121 97 std::multimap<std::string, BaseItem*> items_; //!< Map of items in the collection (indexed by pickupIdentifier of the items). -
code/branches/pickup2/src/orxonox/worldentities/pawns/Pawn.cc
r5929 r6405 70 70 this->spawnparticleduration_ = 3.0f; 71 71 72 this->getPickups().setOwner(this); 72 //TODO: Remove. 73 //this->getPickups().setOwner(this); 73 74 74 75 if (GameMode::isMaster()) … … 295 296 } 296 297 297 void Pawn::dropItems() 298 { 299 this->getPickups().clear(); 300 } 298 //TODO: Remove. 299 // void Pawn::dropItems() 300 // { 301 // this->getPickups().clear(); 302 // } 301 303 302 304 -
code/branches/pickup2/src/orxonox/worldentities/pawns/Pawn.h
r5781 r6405 35 35 #include "interfaces/RadarViewable.h" 36 36 #include "worldentities/ControllableEntity.h" 37 #include "pickup/PickupCollection.h" 37 //TODO: Remove. 38 //#include "pickup/PickupCollection.h" 38 39 39 40 namespace orxonox … … 109 110 { return this->numexplosionchunks_; } 110 111 111 virtual void dropItems(); 112 inline PickupCollection& getPickups() 113 { return this->pickups_; } 114 virtual void useItem() 115 { this->pickups_.useItem(); } 112 //TODO: Remove. 113 // virtual void dropItems(); 114 // inline PickupCollection& getPickups() 115 // { return this->pickups_; } 116 // virtual void useItem() 117 // { this->pickups_.useItem(); } 116 118 117 119 virtual void startLocalHumanControl(); … … 128 130 bool bAlive_; 129 131 130 PickupCollection pickups_; 132 //TODO: Remove. 133 //PickupCollection pickups_; 131 134 132 135 float health_;
Note: See TracChangeset
for help on using the changeset viewer.