Changeset 6412 for code/branches/pickup2/src/orxonox/pickup
- Timestamp:
- Dec 25, 2009, 1:18:03 PM (15 years ago)
- Location:
- code/branches/pickup2
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup2
- Property svn:mergeinfo changed
-
code/branches/pickup2/src/orxonox/pickup/ModifierPickup.cc
r5947 r6412 106 106 for (it = this->additiveModifiers_.begin(); it != this->additiveModifiers_.end(); it++) 107 107 { 108 pawn->getPickups().addAdditiveModifier( (*it).first, (*it).second);108 pawn->getPickups().addAdditiveModifier(it->first, it->second); 109 109 } 110 110 111 111 for (it = this->multiplicativeModifiers_.begin(); it != this->multiplicativeModifiers_.end(); it++) 112 112 { 113 pawn->getPickups().addMultiplicativeModifier( (*it).first, (*it).second);113 pawn->getPickups().addMultiplicativeModifier(it->first, it->second); 114 114 } 115 115 … … 146 146 for (it = this->additiveModifiers_.begin(); it != this->additiveModifiers_.end(); it++) 147 147 { 148 pawn->getPickups().removeAdditiveModifier( (*it).first, (*it).second);148 pawn->getPickups().removeAdditiveModifier(it->first, it->second); 149 149 } 150 150 151 151 for (it = this->multiplicativeModifiers_.begin(); it != this->multiplicativeModifiers_.end(); it++) 152 152 { 153 pawn->getPickups().removeMultiplicativeModifier( (*it).first, (*it).second);153 pawn->getPickups().removeMultiplicativeModifier(it->first, it->second); 154 154 } 155 155 … … 186 186 std::map<ModifierType::Value, float>::const_iterator it = this->additiveModifiers_.find(type); 187 187 if (it != this->additiveModifiers_.end()) 188 return (*it).second;188 return it->second; 189 189 else 190 190 return 0.0f; … … 203 203 std::map<ModifierType::Value, float>::const_iterator it = this->multiplicativeModifiers_.find(type); 204 204 if (it != this->multiplicativeModifiers_.end()) 205 return (*it).second;205 return it->second; 206 206 else 207 207 return 1.0f; -
code/branches/pickup2/src/orxonox/pickup/PickupCollection.cc
r6405 r6412 102 102 for (std::multimap<std::string, BaseItem*>::iterator it = this->items_.begin(); it != this->items_.end(); it++) 103 103 { 104 if( (*it).second && (*it).second->getOwner())105 (*it).second->dropped((*it).second->getOwner());104 if(it->second && it->second->getOwner()) 105 it->second->dropped(it->second->getOwner()); 106 106 } 107 107 this->currentUsable_ = NULL; … … 126 126 for (std::multimap<std::string, BaseItem*>::iterator it = bounds.first; it != bounds.second && it != this->items_.end(); it++) 127 127 { 128 if ( (*it).second == item)128 if (it->second == item) 129 129 { 130 130 return true; … … 178 178 for (std::multimap<std::string, BaseItem*>::iterator it = bounds.first; it != bounds.second && it != this->items_.end(); it++) 179 179 { 180 if ( (*it).second == item)180 if (it->second == item) 181 181 { 182 182 this->items_.erase(it); … … 219 219 for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++) 220 220 { 221 v += (*it).second;221 v += it->second; 222 222 } 223 223 … … 234 234 for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++) 235 235 { 236 if ( (*it).second == value)236 if (it->second == value) 237 237 { 238 238 this->additiveModifiers_.erase(it); … … 262 262 for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++) 263 263 { 264 v *= (*it).second;264 v *= it->second; 265 265 } 266 266 … … 277 277 for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++) 278 278 { 279 if ( (*it).second == value)279 if (it->second == value) 280 280 { 281 281 this->multiplicativeModifiers_.erase(it); … … 337 337 for (std::multimap<std::string, BaseItem*>::iterator it = this->items_.begin(); it != this->items_.end(); it++) 338 338 { 339 if ( (*it).second->isA(ident))340 ret.push_back(orxonox_cast<EquipmentItem*>( (*it).second));339 if (it->second->isA(ident)) 340 ret.push_back(orxonox_cast<EquipmentItem*>(it->second)); 341 341 } 342 342 … … 354 354 for (std::multimap<std::string, BaseItem*>::iterator it = this->items_.begin(); it != this->items_.end(); it++) 355 355 { 356 if ( (*it).second->isA(ident))357 ret.push_back(orxonox_cast<PassiveItem*>( (*it).second));356 if (it->second->isA(ident)) 357 ret.push_back(orxonox_cast<PassiveItem*>(it->second)); 358 358 } 359 359 … … 371 371 for (std::multimap<std::string, BaseItem*>::iterator it = this->items_.begin(); it != this->items_.end(); it++) 372 372 { 373 if ( (*it).second->isA(ident))374 ret.push_back(orxonox_cast<UsableItem*>( (*it).second));373 if (it->second->isA(ident)) 374 ret.push_back(orxonox_cast<UsableItem*>(it->second)); 375 375 } 376 376 -
code/branches/pickup2/src/orxonox/pickup/PickupInventory.cc
r5947 r6412 110 110 { 111 111 if(PickupInventory::getSingleton()->isVisible()) { 112 GUIManager::getInstance().executeCode("hideGUI(\"PickupInventory\")"); 113 GUIManager::getInstance().executeCode("hideCursor()"); 114 InputManager::getInstance().leaveState("guiMouseOnly"); 115 } 116 else 117 { 118 GUIManager::getInstance().showGUI("PickupInventory"); 119 GUIManager::getInstance().executeCode("showCursor()"); 120 InputManager::getInstance().enterState("guiMouseOnly"); 112 GUIManager::hideGUI("PickupInventory"); 113 } 114 else 115 { 116 GUIManager::showGUI("PickupInventory"); 121 117 } 122 118 PickupInventory::getSingleton()->setVisible(!PickupInventory::getSingleton()->isVisible()); … … 235 231 return ""; 236 232 237 std::stringname = "pickup_" + item->getGUIImage();233 const std::string& name = "pickup_" + item->getGUIImage(); 238 234 239 235 if(!CEGUI::ImagesetManager::getSingletonPtr()->isImagesetPresent(name)) … … 242 238 } 243 239 244 return "set:" + name + " image:full_image";240 return ("set:" + name + " image:full_image"); 245 241 } 246 242 … … 374 370 txt->setVisible(true); 375 371 txt->setProperty("Text", item->getGUIText()); 376 txt->setProperty("TextColours", "tl:" + textColour + " tr:" + textColour + " bl:" + textColour + " br:" + textColour + "");377 378 std::stringimage = PickupInventory::getImageForItem(item);372 txt->setProperty("TextColours", "tl:" + textColour + " tr:" + textColour + " bl:" + textColour + " br:" + textColour); 373 374 const std::string& image = PickupInventory::getImageForItem(item); 379 375 btn->setVisible(true); 380 376 btn->setProperty("NormalImage", image); -
code/branches/pickup2/src/orxonox/pickup/UsableItem.cc
r5947 r6412 26 26 * 27 27 */ 28 28 29 29 /** 30 30 @file … … 41 41 @param creator Pointer to the object which created this item. 42 42 */ 43 UsableItem::UsableItem(BaseObject* creator) : BaseItem(creator) 43 UsableItem::UsableItem(BaseObject* creator) : BaseItem(creator) 44 44 { 45 45 RegisterObject(UsableItem);
Note: See TracChangeset
for help on using the changeset viewer.