- Timestamp:
- Jun 16, 2006, 4:10:29 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/graphics/importer/md3/md3_animation_cfg.cc
r8536 r8537 117 117 Tokenizer::tokenize(line, tokens, " \t\n\r\f/"); 118 118 119 // while( !tokens.empty()) 120 // { 121 // PRINTF(0)("tokens: %s\n", tokens.back().c_str()); 122 // tokens.pop_back(); 123 // } 124 125 // newAnimCfg.headOffset= 126 // new md3.util.Vec3(new Float(st.nextToken()).floatValue(), 127 // new Float(st.nextToken()).floatValue(), 128 // new Float(st.nextToken()).floatValue()); 129 } 130 } 131 } 132 /* 133 else if (IN_HEADER && line.startsWith("footsteps")) { 134 //parse line: footsteps [normal | mech | ...] 135 StringTokenizer st=new StringTokenizer(line, " \t\n\r\f/"); 136 137 st.nextToken(); //throw away first token 138 newAnimCfg.footsteps=st.nextToken().trim(); 139 140 if (!(newAnimCfg.footsteps.toLowerCase().equals("default") || 119 float z = atof(tokens.back().c_str()); tokens.pop_back(); 120 float y = atof(tokens.back().c_str()); tokens.pop_back(); 121 float x = atof(tokens.back().c_str()); tokens.pop_back(); 122 123 this->headOffset = Vector(x, y, z); 124 125 PRINTF(0)("got head offset: %f, %f, %f\n", x, y, z); 126 } 127 else if (inHeader && line.find("footsteps") == 0) { 128 //parse line: footsteps [normal | mech | ...] 129 std::vector<std::string> tokens; 130 Tokenizer::tokenize(line, tokens, " \t\n\r\f/"); 131 132 // newAnimCfg.footsteps=st.nextToken().trim(); 133 134 135 while( !tokens.empty()) 136 { 137 PRINTF(0)("tokens: %s\n", tokens.back().c_str()); 138 tokens.pop_back(); 139 } 140 141 142 /* if (!(newAnimCfg.footsteps.toLowerCase().equals("default") || 141 143 newAnimCfg.footsteps.toLowerCase().equals("normal") || 142 144 newAnimCfg.footsteps.toLowerCase().equals("boot") || … … 144 146 newAnimCfg.footsteps.toLowerCase().equals("mech") || 145 147 newAnimCfg.footsteps.toLowerCase().equals("energy") 146 )) 148 ))*/ 147 149 //don't throw an exception, non-fatal error 148 newAnimCfg.footsteps="illegal footsteps value (" + newAnimCfg.footsteps + ")"; 149 } 150 // newAnimCfg.footsteps="illegal footsteps value (" + newAnimCfg.footsteps + ")"; 151 } 152 } 153 } 154 /* 150 155 else { 151 156 //assume it's an animation line
Note: See TracChangeset
for help on using the changeset viewer.