- Timestamp:
- Mar 10, 2006, 2:20:08 AM (19 years ago)
- Location:
- branches/std/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/std/src/lib/gui/gl_gui/glmenu/glmenu_imagescreen.cc
r7208 r7209 13 13 ### File Specific: 14 14 main-programmer: Patrick Boenzli 15 co-programmer: 15 co-programmer: Benjamin GRauer 16 16 */ 17 17 … … 84 84 85 85 /** 86 * sets the background image name86 * @brief sets the background image name 87 87 * @param backImageName name of the backgroun-image 88 88 */ … … 93 93 94 94 /** 95 * sets position of the ImageScreen95 * @brief sets position of the ImageScreen 96 96 * @param offsetX offset from the top left corner in percent(0-1) of the screensize 97 97 * @param offsetY offset from the top left corner in percent(0-1) of the screensize … … 104 104 105 105 /** 106 \brief sets size of the ImageScreen106 * @brief sets size of the ImageScreen 107 107 * @param scaleX the scaleing of the image into the x-direction (in percent (0-1)) 108 108 * @param scaleY the scaleing of the image into the y-direction (in percent (0-1)) … … 115 115 116 116 /** 117 \brief sets position and size of the ImageScreen118 * @param offsetX offset from the top left corner in percent(0-1) of the screensize119 * @param offsetY offset from the top left corner in percent(0-1) of the screensize120 * @param scaleX the scaleing of the image into the x-direction (in percent (0-1))121 * @param scaleY the scaleing of the image into the y-direction (in percent (0-1))117 * @brief sets position and size of the ImageScreen 118 * @param offsetX offset from the top left corner in percent(0-1) of the screensize 119 * @param offsetY offset from the top left corner in percent(0-1) of the screensize 120 * @param scaleX the scaleing of the image into the x-direction (in percent (0-1)) 121 * @param scaleY the scaleing of the image into the y-direction (in percent (0-1)) 122 122 */ 123 123 void GLMenuImageScreen::setPosScale(float offsetX, float offsetY, float scaleX, float scaleY) … … 136 136 137 137 /** 138 * sets the Position and the Size of the bar138 * @brief sets the Position and the Size of the bar 139 139 * @param barX The Position in the x-direction in percent of the screen (0-1) 140 140 * @param barY The Position in the y-direction in percent of the screen (0-1) … … 152 152 153 153 /** 154 * set the maximum of countable steps154 * @brief set the maximum of countable steps 155 155 * @param maxValue of steps 156 156 */ … … 161 161 162 162 /** 163 * set current value163 * @brief set current value 164 164 * @param currentValue value to set 165 165 */ … … 172 172 173 173 /** 174 * get the current value174 * @brief get the current value 175 175 */ 176 176 int GLMenuImageScreen::getValue() … … 181 181 182 182 /** 183 *call this to trigger a progress event184 185 183 * @brief call this to trigger a progress event 184 * 185 * this has to redraw the progress bar and the whole image 186 186 */ 187 187 void GLMenuImageScreen::step () … … 199 199 200 200 /** 201 * draws the ImageScreen to the screenbuffer201 * @brief draws the ImageScreen to the screenbuffer 202 202 */ 203 203 void GLMenuImageScreen::draw () -
branches/std/src/lib/util/loading/factory.cc
r7193 r7209 23 23 //SHELL_COMMAND(create, Factory, fabricate); 24 24 25 26 /* -------------------------------------------------- 27 * Factory28 * --------------------------------------------------25 /** 26 * @brief constructor 27 * 28 * set everything to zero and define factoryName 29 29 */ 30 31 /** 32 * constructor 33 34 set everything to zero and define factoryName 35 */ 36 Factory::Factory (const char* factoryName, ClassID classID) 30 Factory::Factory (const std::string& factoryName, ClassID classID) 31 : className(factoryName), classID(classID) 37 32 { 38 33 this->setClassID(CL_FACTORY, "Factory"); 39 34 this->setName(factoryName); 40 41 this->classID = classID;42 this->className = factoryName;43 35 44 36 if( Factory::factoryList == NULL) … … 48 40 } 49 41 50 /** a reference to the First Factory */42 /** @brief a reference to the First Factory */ 51 43 std::list<Factory*>* Factory::factoryList = NULL; 52 44 53 45 /** 54 * destructor 55 * 56 * clear the Q 46 * @brief destructor 57 47 */ 58 48 Factory::~Factory () … … 64 54 65 55 /** 66 * deletes all the Factories. (cleanup)56 * @brief deletes all the Factories. (cleanup) 67 57 */ 68 58 void Factory::deleteFactories() … … 90 80 91 81 /** 92 * Compares the Factories Name against a given ClassName82 * @brief Compares the Factories Name against a given ClassName 93 83 * @param className the Name of the Class to Query 94 84 * @returns true on match, false otherwise. … … 96 86 bool Factory::operator==(const char* className) const 97 87 { 98 return(className != NULL && !strcmp(className, this->className)); 88 return(className != NULL && this->className == className); 89 } 90 91 /** 92 * @brief Compares the Factories Name against a given ClassName 93 * @param className the Name of the Class to Query 94 * @returns true on match, false otherwise. 95 */ 96 bool Factory::operator==(const std::string& className) const 97 { 98 return(this->className == className); 99 99 } 100 100 101 101 102 102 /** 103 * Creates a new Object of type root->Value() (name)103 * @brief Creates a new Object of type root->Value() (name) 104 104 * @param root the XML-Root to match for the newly created Object 105 105 * @returns a new Object of Type root->Value() on match, NULL otherwise … … 133 133 * @returns a new Object of Type className on match, NULL otherwise 134 134 */ 135 BaseObject* Factory::fabricate(const char*className)135 BaseObject* Factory::fabricate(const std::string& className) 136 136 { 137 if ( className == NULL ||Factory::factoryList == NULL)137 if (Factory::factoryList == NULL) 138 138 return NULL; 139 139 -
branches/std/src/lib/util/loading/factory.h
r7167 r7209 49 49 static void deleteFactories(); 50 50 51 static BaseObject* fabricate(const char*className);51 static BaseObject* fabricate(const std::string& className); 52 52 static BaseObject* fabricate(ClassID classID); 53 53 static BaseObject* fabricate(const TiXmlElement* root = NULL); … … 56 56 bool operator==(ClassID classID) const; 57 57 bool operator==(const char* className) const; 58 bool operator==(const std::string& className) const; 58 59 59 60 protected: 60 Factory (const char*factoryName, ClassID classID);61 Factory (const std::string& factoryName, ClassID classID); 61 62 virtual BaseObject* fabricateObject(const TiXmlElement* root = NULL) const = 0; 62 63 63 64 protected: 64 ClassIDclassID; //!< The Class-Identifyer of the Factory.65 const char*className; //!< The name of the Class.65 const ClassID classID; //!< The Class-Identifyer of the Factory. 66 const std::string className; //!< The name of the Class. 66 67 static std::list<Factory*>* factoryList; //!< List of Registered Factories 67 68 }; -
branches/std/src/lib/util/loading/load_param.cc
r7206 r7209 59 59 if (likely(this->executor != NULL)) 60 60 { 61 std::string loadString ;61 std::string loadString = ""; 62 62 if (this->loadElem != NULL && this->loadElem->ToText()) 63 63 loadString = this->loadElem->Value(); … … 66 66 ((this->executor->getType() & Executor_NoLoadString) == Executor_NoLoadString))) 67 67 { 68 PRINTF(4)("Loading '%s' with Parameters '%s' onto: '%s'(%s)\n", this->paramName, loadString , this->object->getName(), this->object->getClassName());68 PRINTF(4)("Loading '%s' with Parameters '%s' onto: '%s'(%s)\n", this->paramName, loadString.c_str(), this->object->getName(), this->object->getClassName()); 69 69 this->executor->execute(this->object, &loadString); 70 70 } -
branches/std/src/world_entities/power_ups/weapon_power_up.cc
r7193 r7209 92 92 } 93 93 94 void WeaponPowerUp::setWeaponClass(const char*name)94 void WeaponPowerUp::setWeaponClass(const std::string& name) 95 95 { 96 96 this->weapon = dynamic_cast<Weapon*>(Factory::fabricate(name)); 97 97 if (this->weapon == NULL) 98 98 { 99 PRINTF(1)("Unable to load Weapon. %s\n", name );99 PRINTF(1)("Unable to load Weapon. %s\n", name.c_str()); 100 100 this->weapon = dynamic_cast<Weapon*>(Factory::fabricate("Turret")); 101 101 } -
branches/std/src/world_entities/power_ups/weapon_power_up.h
r7065 r7209 22 22 23 23 Weapon* getWeapon(); 24 void setWeaponClass(const char*name);24 void setWeaponClass(const std::string& name); 25 25 26 26 virtual int writeBytes(const byte* data, int length, int sender);
Note: See TracChangeset
for help on using the changeset viewer.