- Timestamp:
- Dec 3, 2005, 1:29:42 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/texture_sequence.cc
r5865 r5885 155 155 156 156 /** 157 * moves to the n'th texture which can then be retrieved via the Texture function: this->getTexture()157 * @brief moves to the n'th texture which can then be retrieved via the Texture function: this->getTexture() 158 158 * @param frameNumber the n-th frame 159 159 */ -
trunk/src/lib/graphics/text_engine/text_engine.cc
r5780 r5885 64 64 { 65 65 // first remove all the remaining Texts (if any). 66 std::list<BaseObject*>* textList = ClassList::getList(CL_TEXT);66 const std::list<BaseObject*>* textList = ClassList::getList(CL_TEXT); 67 67 if (textList != NULL) 68 68 { … … 71 71 } 72 72 // delete all remaining fonts (There should not be Anything to do here) 73 std::list<BaseObject*>* fontList = ClassList::getList(CL_FONT);73 const std::list<BaseObject*>* fontList = ClassList::getList(CL_FONT); 74 74 if (fontList != NULL) 75 75 { … … 124 124 void TextEngine::debug() const 125 125 { 126 list<BaseObject*>* textList = ClassList::getList(CL_TEXT);126 const list<BaseObject*>* textList = ClassList::getList(CL_TEXT); 127 127 if (textList != NULL) 128 128 { … … 132 132 PRINT(0)("Reference: %p; Text Counts: %d\n", this, textList->size()); 133 133 134 list<BaseObject*>:: iterator text;134 list<BaseObject*>::const_iterator text; 135 135 for ( text = textList->begin(); text != textList->end(); text++) 136 136 dynamic_cast<Text*>(*text)->debug(); -
trunk/src/lib/lang/class_list.cc
r5822 r5885 133 133 * @return the List accessed by classID, or NULL if not found 134 134 */ 135 std::list<BaseObject*>* ClassList::getList(ClassID classID)135 const std::list<BaseObject*>* ClassList::getList(ClassID classID) 136 136 { 137 137 ClassList* fl; … … 156 156 * @return the List accessed by classID, or NULL if not found 157 157 */ 158 std::list<BaseObject*>* ClassList::getList(const char* className)158 const std::list<BaseObject*>* ClassList::getList(const char* className) 159 159 { 160 160 ClassList* fl; -
trunk/src/lib/lang/class_list.h
r5821 r5885 40 40 static void removeFromClassList(BaseObject* objectPointer); 41 41 42 static std::list<BaseObject*>*getList(ClassID classID = CL_NULL);// { return (ClassList* fl = ClassList::getClassList(classID) != NULL)? &(fl->objectList) : NULL; };43 static std::list<BaseObject*>*getList(const char* className); // { return (ClassList* fl = ClassList::getClassList(className) != NULL)? &(fl->objectList) : NULL; };42 static const std::list<BaseObject*>* getList(ClassID classID = CL_NULL);// { return (ClassList* fl = ClassList::getClassList(classID) != NULL)? &(fl->objectList) : NULL; }; 43 static const std::list<BaseObject*>* getList(const char* className); // { return (ClassList* fl = ClassList::getClassList(className) != NULL)? &(fl->objectList) : NULL; }; 44 44 static const std::list<const char*>* getClassNames(); 45 45 static BaseObject* getObject(const char* name, ClassID classID = CL_NULL); -
trunk/src/lib/network/network_manager.cc
r5822 r5885 161 161 if (this->netStreamList != NULL || (this->netStreamList = ClassList::getList(CL_NETWORK_STREAM)) != NULL) 162 162 { 163 std::list<BaseObject*>:: iterator stream;163 std::list<BaseObject*>::const_iterator stream; 164 164 for (stream = this->netStreamList->begin(); stream != this->netStreamList->end(); ++stream) 165 165 static_cast<NetworkStream*>(*stream)->processData(); -
trunk/src/lib/network/network_manager.h
r5822 r5885 41 41 42 42 private: 43 std::list<BaseObject*>* netStreamList; // list with refs to all network streams44 std::list<BaseObject*>* syncList; // list of synchronizeables43 const std::list<BaseObject*>* netStreamList; // list with refs to all network streams 44 const std::list<BaseObject*>* syncList; // list of synchronizeables 45 45 46 46 }; -
trunk/src/lib/shell/shell_command.cc
r5791 r5885 159 159 long classID = CL_NULL; //< the classID retrieved from the Class. 160 160 ShellCommandClass* commandClass = NULL; //< the command class this command applies to. 161 std::list<BaseObject*>* objectList = NULL; //< the list of Objects stored in classID161 const std::list<BaseObject*>* objectList = NULL; //< the list of Objects stored in classID 162 162 BaseObject* objectPointer = NULL; //< a pointer to th Object to Execute the command on 163 163 bool emptyComplete = false; //< if the completion input is empty string. e.g "" -
trunk/src/lib/shell/shell_completion.cc
r5791 r5885 58 58 59 59 long classID; //< the classID retrieved from the Class. 60 std::list<BaseObject*>* objectList; //< the list of Objects stored in classID60 const std::list<BaseObject*>* objectList; //< the list of Objects stored in classID 61 61 bool emptyComplete = false; //< if the completion input is empty string. e.g "" 62 62 long completeType = SHELLC_NONE; //< the Type we'd like to complete. -
trunk/src/lib/sound/sound_engine.cc
r5856 r5885 137 137 if (this->sourceList != NULL) 138 138 { 139 list<BaseObject*>:: iterator source;139 list<BaseObject*>::const_iterator source; 140 140 for (source = this->sourceList->begin(); source != this->sourceList->end(); source++) 141 141 { … … 182 182 if (likely(this->sourceList != NULL)) 183 183 { 184 list<BaseObject*>:: iterator sourceIT;184 list<BaseObject*>::const_iterator sourceIT; 185 185 SoundSource* source; 186 186 for (sourceIT = this->sourceList->begin(); sourceIT != this->sourceList->end(); sourceIT++) -
trunk/src/lib/sound/sound_engine.h
r5819 r5885 66 66 67 67 private: 68 static SoundEngine* singletonRef; //!< Reference to this class68 static SoundEngine* singletonRef; //!< Reference to this class 69 69 70 ALCdevice* device; //!< the used audio-device.71 ALCcontext* context; //!< the context, currently in use.70 ALCdevice* device; //!< the used audio-device. 71 ALCcontext* context; //!< the context, currently in use. 72 72 73 float musicVolume; //!< the maximum volume of the music in % (0f,1f]74 float effectsVolume; //!< the maximum volume of sound-effects in % (0f,1f]75 PNode* listener; //!< The listener of the Scene73 float musicVolume; //!< the maximum volume of the music in % (0f,1f] 74 float effectsVolume; //!< the maximum volume of sound-effects in % (0f,1f] 75 PNode* listener; //!< The listener of the Scene 76 76 77 std::list<BaseObject*>* bufferList; //!< A list of buffers78 std::list<BaseObject*>* sourceList; //!< A list for all the sources in the scene.77 const std::list<BaseObject*>* bufferList; //!< A list of buffers 78 const std::list<BaseObject*>* sourceList; //!< A list for all the sources in the scene. 79 79 80 80 -
trunk/src/world_entities/weapons/weapon_manager.cc
r5779 r5885 110 110 this->crossHairSizeAnim->addKeyFrame(100, .05, ANIM_LINEAR); 111 111 this->crossHairSizeAnim->addKeyFrame(50, .01, ANIM_LINEAR); 112 113 this->targetIterator = NULL;114 112 } 115 113 … … 337 335 } 338 336 } 339 }340 341 342 /**343 * Selects an Entity from the NPC-list, and returns the Target344 */345 PNode* WeaponManager::getSomeTarget()346 {347 if (this->targetIterator == NULL)348 {349 std::list<BaseObject*>* npcList = ClassList::getList(CL_NPC);350 if (npcList != NULL)351 {352 this->targetIterator = npcList->begin();353 }354 else355 return NULL;356 }357 358 ///FIXME359 // this->targetIterator++;360 PNode* retNode = dynamic_cast<PNode*>((*targetIterator));361 // if (retNode == NULL && this->targetIterator->getList()->getSize() > 0)362 // retNode = dynamic_cast<PNode*>(targetIterator->firstElement());363 364 return retNode;365 }366 367 368 /**369 * Selects an Entity from the Entity-List, that is near of the carrier PNode.370 * @param carrier: The PNode from which the distance should be measured371 * @param distance: The Maximum Distance to Return.372 */373 PNode* WeaponManager::getDistanceTarget(const PNode* carrier, float distance)374 {375 std::list<BaseObject*>* npcList = ClassList::getList(CL_NPC);376 if (npcList != NULL)377 {378 list<BaseObject*>::iterator node;379 for (node= npcList->begin(); node != npcList->end(); node++)380 if ((carrier->getAbsCoor() - dynamic_cast<PNode*>(*node)->getAbsCoor()).len() < distance)381 return dynamic_cast<PNode*>(*node);382 }383 return this->getFixedTarget();384 337 } 385 338 -
trunk/src/world_entities/weapons/weapon_manager.h
r5779 r5885 80 80 /** @returns a fixed target namely the Crosshair's 3D position */ 81 81 inline PNode* getFixedTarget() const { return this->crosshair; }; 82 PNode* getSomeTarget();83 PNode* getDistanceTarget(const PNode* carrier, float distance);84 82 85 83 void fire(); … … 109 107 Crosshair* crosshair; //!< an aim. 110 108 tAnimation<Crosshair>* crossHairSizeAnim; //!< An animation for the crosshair (scaling) 111 112 std::list<BaseObject*>::iterator targetIterator; //!< An iterator for traversion lists of enemies.113 109 };
Note: See TracChangeset
for help on using the changeset viewer.