Changeset 8297 in orxonox.OLD for trunk/src/lib/graphics
- Timestamp:
- Jun 9, 2006, 2:56:50 AM (19 years ago)
- Location:
- trunk/src/lib/graphics/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/texture_sequence.cc
r7221 r8297 86 86 this->textures[i] = loadTexToGL(this->images[i]); 87 87 } 88 return true; 88 89 } 89 90 … … 117 118 } 118 119 return retVal; 120 } 121 122 bool TextureSequence::loadImageSeries(const std::string& imagePrefix, unsigned int from, unsigned int to, const std::string& extension) 123 { 124 unsigned int index = 0; 125 unsigned int frameSize = 0; 126 // search for the special character # in the LoadParam 127 if ((index = imagePrefix.find("_#")) != std::string::npos) 128 { 129 std::string _imagePrefix = imagePrefix; 130 index++; // start at # 131 while(imagePrefix[index+frameSize] == '#') 132 { 133 _imagePrefix[index+frameSize] = '0'; 134 frameSize++; 135 } 136 137 PRINTF(4)("Found %d '#'s in %s... searching for LOD's\n", frameSize, imagePrefix.c_str()); 138 char tmpString[32]; 139 for (unsigned int i = from; i < to; i++) 140 { 141 sprintf(tmpString, "%d", i); 142 _imagePrefix.replace(index+frameSize -strlen(tmpString), index+frameSize, tmpString); 143 printf("TEST STRING %s\n", _imagePrefix.c_str()); 144 } 145 return true; 146 } 147 return false; 119 148 } 120 149 -
trunk/src/lib/graphics/importer/texture_sequence.h
r7221 r8297 23 23 bool loadImageSeries(unsigned int count, ...); 24 24 bool loadImageSeries(unsigned int count, va_list textureNames); 25 bool loadImageSeries(const std::string& imagePrefix, unsigned int from, unsigned int to, const std::string& extension = "png"); 25 26 bool addFrame(const std::string& image); 26 27 bool addFrame(SDL_Surface* surface);
Note: See TracChangeset
for help on using the changeset viewer.