Changeset 9314 in orxonox.OLD for branches/proxy/src/lib
- Timestamp:
- Jul 18, 2006, 1:48:19 AM (18 years ago)
- Location:
- branches/proxy/src/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/graphics/importer/md3/md3_animation_cfg.cc
r8724 r9314 19 19 #include "md3_animation.h" 20 20 21 #include " tokenizer.h"21 #include "substring.h" 22 22 #include "helper_functions.h" 23 23 24 24 #include "debug.h" 25 25 26 #include <stdio.h>27 #include <stdlib.h>28 26 29 27 … … 98 96 if( inHeader && line.find("sex") == 0) { 99 97 //parse line: sex [m | f | ...] 100 std::vector<std::string> tokens; 101 Tokenizer::tokenize(line, tokens, " \t\n\r\f/"); 98 SubString tokens(line, " \t\n\r\f/"); 102 99 103 100 std::string sexStr = tokens.back(); … … 115 112 else if( inHeader && line.find("headoffset") == 0) { 116 113 // parse line: headoffset X Y Z 117 std::vector<std::string> tokens; 118 Tokenizer::tokenize(line, tokens, " \t\n\r\f/"); 114 SubString tokens(line, " \t\n\r\f/"); 119 115 120 116 float z = atof(tokens.back().c_str()); tokens.pop_back(); … … 128 124 else if( inHeader && line.find("footsteps") == 0) { 129 125 //parse line: footsteps [normal | mech | ...] 130 std::vector<std::string> tokens; 131 Tokenizer::tokenize(line, tokens, " \t\n\r\f/"); 126 SubString tokens (line, " \t\n\r\f/"); 132 127 133 128 this->footsteps = tokens.back(); … … 187 182 // parse the line: 188 183 // first frame, num frames, looping frames, frames per second (fps) 189 std::vector<std::string> tokens; 190 Tokenizer::tokenize(line, tokens, " \t\n\r\f/"); 184 SubString tokens(line, " \t\n\r\f/"); 191 185 192 186 anim->fps = atoi(tokens.back().c_str()); tokens.pop_back(); -
branches/proxy/src/lib/util/substring.h
r9313 r9314 91 91 /** @returns the back of the StringList. */ 92 92 inline const std::string& back() const { return this->strings.back(); }; 93 /** @brief removes the back of the strings list. */ 94 inline void pop_back() { this->strings.pop_back(); }; 93 95 94 96 // the almighty algorithm.
Note: See TracChangeset
for help on using the changeset viewer.